-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNMF.h
91 lines (71 loc) · 1.98 KB
/
NMF.h
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#pragma once
#include <stdint.h>
#include <Windows.h>
#define NMF_VERSION "0.1"
#ifdef NMF_USER_CONFIG
#include NMF_USER_CONFIG
#endif
#ifndef NMF_EXPORT
#define NMF_EXPORT
#endif
#ifndef NMF_EXTENDED_EXPORT
#define NMF_EXTENDED_EXPORT
#endif
#define NMF_DELETE_ALL_INIT(type) \
type() = delete; \
type(const type&) = delete; \
type(type&&) = delete; \
type& operator=(const type&) = delete; \
type& operator=(type&&) = delete;
#define NMF_DELETE_INIT(type) \
type(const type&) = delete; \
type(type&&) = delete; \
type& operator=(const type&) = delete; \
type& operator=(type&&) = delete;
#define ASSERT_CLASS_SIZE(class, size) static_assert(sizeof(class) == size, "Size of " #class " doesn't match expected size " #size "!")
#define ASSERT_CLASS_MEMBER_OFFSET(class, member, offset) static_assert(offsetof(class, member) == offset, "Offset of " #member " in class " #class " doesn't match expected offset " #offset "!")
namespace NMF
{
enum class NMFExitCode : int32_t
{
#ifdef NMF_IMGUI_POP_OUT
ImGuiManagerRegisterExternalWindow = 10,
ImGuiManagerCreateExternalWindow = 11,
#endif
ImGuiManagerInvalidImGuiVersion = 12,
ImGuiManagerDeviceHooks = 13,
};
enum class WndProcHandleResult : uint8_t
{
Continue,
Handled,
Default
};
WndProcHandleResult NMFWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
NMF_EXPORT void NMFRestoreImportTable();
NMF_EXPORT void NMFExit(NMFExitCode exitCode);
namespace External
{
#ifdef NMF_EXTERN_SET_GAME_FOCUS
extern void SetGameFocus(bool focus);
#endif
}
}
#ifdef NMF_USE_LOGGING
#include "NMF_Logging.h"
#endif
#include "NMF_Memory.h"
#ifdef NMF_USE_IMGUI
#include "NMF_ImGui.h"
#endif
#ifdef NMF_USE_EXT_LUA
#include "NMF_Lua.h"
#endif
#ifdef NMF_USE_MODDING
#include "NMF_Modding.h"
#endif
#ifdef NMF_USE_RTTI
#include "NMF_RTTI.h"
#endif
#undef NMF_DELETE_ALL_INIT
#undef NMF_DELETE_INIT