|
6 | 6 |
|
7 | 7 | namespace nob {
|
8 | 8 | namespace shv {
|
9 |
| - int (*createTexture)(const char *texFileName); |
| 9 | + int (WINAPI *createTexture)(const char *texFileName); |
10 | 10 |
|
11 |
| - void (*drawTexture)( |
| 11 | + void (WINAPI *drawTexture)( |
12 | 12 | int id, int index, int level, int time,
|
13 | 13 | float sizeX, float sizeY, float centerX, float centerY,
|
14 | 14 | float posX, float posY, float rotation, float screenHeightScaleFactor,
|
15 | 15 | float r, float g, float b, float a
|
16 | 16 | );
|
17 | 17 |
|
18 |
| - void (*presentCallbackRegister)(PresentCallback cb); |
19 |
| - void (*presentCallbackUnregister)(PresentCallback cb); |
| 18 | + void (WINAPI *presentCallbackRegister)(PresentCallback cb); |
| 19 | + void (WINAPI *presentCallbackUnregister)(PresentCallback cb); |
20 | 20 |
|
21 |
| - void (*keyboardHandlerRegister)(KeyboardHandler handler); |
22 |
| - void (*keyboardHandlerUnregister)(KeyboardHandler handler); |
| 21 | + void (WINAPI *keyboardHandlerRegister)(KeyboardHandler handler); |
| 22 | + void (WINAPI *keyboardHandlerUnregister)(KeyboardHandler handler); |
23 | 23 |
|
24 |
| - void (*scriptWait)(DWORD time); |
25 |
| - void (*scriptRegister)(HMODULE module, void(*LP_SCRIPT_MAIN)()); |
26 |
| - void (*scriptRegisterAdditionalThread)(HMODULE module, void(*LP_SCRIPT_MAIN)()); |
27 |
| - void (*scriptUnregister)(HMODULE module); |
| 24 | + void (WINAPI *scriptWait)(DWORD time); |
| 25 | + void (WINAPI *scriptRegister)(HMODULE module, void(WINAPI *LP_SCRIPT_MAIN)()); |
| 26 | + void (WINAPI *scriptRegisterAdditionalThread)(HMODULE module, void(WINAPI *LP_SCRIPT_MAIN)()); |
| 27 | + void (WINAPI *scriptUnregister)(HMODULE module); |
28 | 28 |
|
29 |
| - void (*nativeInit)(UINT64 hash); |
30 |
| - void (*nativePush64)(UINT64 val); |
31 |
| - PUINT64 (*nativeCall)(); |
| 29 | + void (WINAPI *nativeInit)(UINT64 hash); |
| 30 | + void (WINAPI *nativePush64)(UINT64 val); |
| 31 | + PUINT64 (WINAPI *nativeCall)(); |
32 | 32 |
|
33 |
| - UINT64 *(*getGlobalPtr)(int globalId); |
| 33 | + UINT64 *(WINAPI *getGlobalPtr)(int globalId); |
34 | 34 |
|
35 |
| - int (*worldGetAllVehicles)(int *arr, int arrSize); |
36 |
| - int (*worldGetAllPeds)(int *arr, int arrSize); |
37 |
| - int (*worldGetAllObjects)(int *arr, int arrSize); |
38 |
| - int (*worldGetAllPickups)(int *arr, int arrSize); |
| 35 | + int (WINAPI *worldGetAllVehicles)(int *arr, int arrSize); |
| 36 | + int (WINAPI *worldGetAllPeds)(int *arr, int arrSize); |
| 37 | + int (WINAPI *worldGetAllObjects)(int *arr, int arrSize); |
| 38 | + int (WINAPI *worldGetAllPickups)(int *arr, int arrSize); |
39 | 39 |
|
40 |
| - BYTE *(*getScriptHandleBaseAddress)(int handle); |
| 40 | + BYTE *(WINAPI *getScriptHandleBaseAddress)(int handle); |
41 | 41 |
|
42 |
| - eGameVersion (*getGameVersion)(); |
| 42 | + eGameVersion (WINAPI *getGameVersion)(); |
43 | 43 |
|
44 | 44 | constexpr const std::array<LPCWSTR, 2> _module_names {{
|
45 | 45 | L"ScriptHookV.dll",
|
|
0 commit comments