Repository navigation
Expand file tree
/
Copy pathUnrealBeef.h
More file actions
70 lines (50 loc) · 1.68 KB
/
Copy pathUnrealBeef.h
File metadata and controls
70 lines (50 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#include <stdint.h>
#include "Engine/EngineTypes.h"
#include "GameFramework/GameModeBase.h"
#define UBF_VERSION 1
#pragma warning(disable:4191)
bool UBF_Init(const char* dllPath);
void UBF_Unload();
void UBF_SetWantsDLLUnload(bool onGameModeExit, bool onCPPRebuild);
#ifdef UBF_IMPLEMENTATION
#define DECLPROC(name, sig, paramNames) \
typedef int(*T_##name)##sig; \
static T_##name g##name; \
void UBF_##name##sig \
{ \
if (g##name == NULL) return; \
g##name##paramNames; \
}
#define DECLPROC_NOIMPL(name, sig, paramNames) \
typedef int(*T_##name)##sig; \
static T_##name g##name; \
void UBF_##name##sig;
#else
#define DECLPROC(name, sig, paramNames) \
typedef int(*T_##name)##sig; \
void UBF_##name##sig;
#define DECLPROC_NOIMPL(name, sig, paramNames) \
typedef int(*T_##name)##sig; \
void UBF_##name##sig;
#endif
#define IFACEDECL(kind, name, sig, paramNames) \
typedef int(*T_##name)##sig; \
void UBFImpl_##kind##name##sig \
{ \
if (g##name == NULL) return; \
self->##name##paramNames; \
}
DECLPROC(App_Init, (int32 version, void** callbacks), (version, callbacks));
DECLPROC(App_Start, (), ());
DECLPROC_NOIMPL(App_Done, (), ());
DECLPROC(App_PreGarbageCollectDelegate, (), ());
DECLPROC(Class_Register, (UClass* uclass, void** callbacks), (uclass, callbacks));
DECLPROC(Object_Created, (UObject* uobject), (uobject));
DECLPROC(Object_Deleted, (UObject* uobject), (uobject));
DECLPROC(Actor_Tick, (AActor* self, float deltaTime), (self, deltaTime));
DECLPROC(HUD_DrawHUD, (AHUD* self), (self));
DECLPROC(World_StartTick, (UWorld* uworld, ELevelTick tick, float deltaTime), (uworld, tick, deltaTime));
#ifdef UBF_IMPLEMENTATION
#include "UnrealBeef.cpp"
#endif