| 9 |
|
#define DefFunc( type, name, callingconvention, args, address) typedef type ( callingconvention * _##name ) args; static const _##name name = (_##name)address |
| 10 |
|
|
| 11 |
|
// Orig timing functions, replaced by DDrMachineTime_* if option "usegettickcount" is enabled |
| 12 |
< |
DefFunc(int64_t, UUrMachineTime_High, ONICALL, (), 0x04026480); |
| 13 |
< |
DefFunc(double, UUrMachineTime_High_Frequency, ONICALL, (), 0x040264b0); |
| 14 |
< |
DefFunc(int64_t, UUrMachineTime_Sixtieths, ONICALL, (), 0x040263e0); |
| 12 |
> |
DefFunc(int64_t, UUrMachineTime_High, ONICALL, (), 0x00426480); |
| 13 |
> |
DefFunc(double, UUrMachineTime_High_Frequency, ONICALL, (), 0x004264b0); |
| 14 |
> |
DefFunc(int64_t, UUrMachineTime_Sixtieths, ONICALL, (), 0x004263e0); |
| 15 |
|
|
| 16 |
|
// Code to initialize platform stuff (like disabling system key combination Alt+Tab) |
| 17 |
< |
DefFunc(void, UUrPlatform_Initialize, ONICALL, (), 0x04026010); |
| 18 |
< |
DefFunc(void, UUrPlatform_Terminate, ONICALL, (), 0x04026310); |
| 17 |
> |
DefFunc(void, UUrPlatform_Initialize, ONICALL, (), 0x00426010); |
| 18 |
> |
DefFunc(void, UUrPlatform_Terminate, ONICALL, (), 0x00426310); |
| 19 |
|
|
| 20 |
|
// Oni's file access methods |
| 21 |
|
DefFunc(FILE*, oni_fopen, __cdecl, (const char*, const char*), 0x0051ea9f); |
| 38 |
|
// Original graphics initialization/cleanup functions patched to use |
| 39 |
|
// DD_GLrPlatform_Initialize/DD_GLrPlatform_Dispoose instead if daodangl is used. |
| 40 |
|
DefFunc(UUtBool, gl_platform_initialize, ONICALL, (void), 0x00407da0); |
| 41 |
< |
DefFunc(void, gl_platform_dispose, ONICALL, (void), 0x408210); |
| 41 |
> |
DefFunc(void, gl_platform_dispose, ONICALL, (void), 0x00408210); |
| 42 |
|
|
| 43 |
|
// Retrieve gamma value from settings |
| 44 |
|
DefFunc(float, ONrPersist_GetGamma, ONICALL, (), 0x0050f450); |
| 56 |
|
DefFunc(void, ONrGameState_DeleteCharacter, ONICALL, (Character *inCharacter), 0x004DC480); |
| 57 |
|
|
| 58 |
|
DefFunc(void, ONrGameState_Timer_Start, ONICALL, (char* function, int time), 0x004FD370); |
| 59 |
< |
DefFunc(void, ONrGameState_HandleUtilityInput, ONICALL, (const void* inInput), 0x004f6200); |
| 59 |
> |
DefFunc(void, ONrGameState_HandleUtilityInput, ONICALL, (GameInput *input), 0x004f6200); |
| 60 |
|
DefFunc(uint8_t, ONrDebugKey_WentDown, ONICALL, (uint32_t inKey), 0x005050d0); |
| 61 |
|
|
| 62 |
|
// Get active (player?) character |
| 100 |
|
DefFunc(uint16_t, SLrGlobalVariable_Register_String, ONICALL, (char* name, char* desc, char* data), 0x00477fe0); |
| 101 |
|
|
| 102 |
|
// Print message to console ? |
| 103 |
< |
DefFunc(int, COrMessage_Print, ONICALL, (char* Message, char* Key, void* noidea), 0x004304B0); |
| 103 |
> |
DefFunc(int, COrMessage_Print, ONICALL, (const char* Message, const char* Key, uint32_t fadeTime), 0x004304B0); |
| 104 |
|
DefFunc(UUtBool, COrCommand_Execute, ONICALL, (char* command), 0x004317D0); |
| 105 |
|
|
| 106 |
|
DefFunc(void, COrConsole_StatusLine_Display, ONICALL, (), 0x00431E70); |
| 127 |
|
DefFunc(uint16_t, iSetCharacterClass, ONICALL, (sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret), 0x004D99D0); |
| 128 |
|
DefFunc(uint16_t, AI2iScript_Spawn, ONICALL, (sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret), 0x004B4780); |
| 129 |
|
DefFunc(void, AI2rSmite, ONICALL, (Character *inCharacter, UUtBool inSpareCharacter), 0x0048BDA0); |
| 130 |
– |
//NOT USED: DefFunc(void*, OBJrObjectType_GetObject_ByNumber, ONICALL, (int inObjectType, int inIndex), ); |
| 131 |
– |
//NOT USED: DefFunc(int, OBJiObjectGroup_GetNumObjects, ONICALL, (void *inObjectGroup), ); |
| 130 |
|
|
| 131 |
|
DefFunc(int, OBJrObjectType_EnumerateObjects, ONICALL, (int inObjectType, OBJtEnumCallback_Object inEnumCallback, int inUserData), 0x004D0080); |
| 134 |
– |
//DefFunc(void, OBJrTriggerVolume_IntersectsCharacter, ONICALL, (), 0x004cc680); |
| 132 |
|
|
| 133 |
|
DefFunc(void, OBJrDoor_Open, ONICALL, (DoorObject *inObject, Character *inCharacter), 0x004C26C0); |
| 134 |
|
DefFunc(void, OBJrDoor_ForceOpen, ONICALL, (short id), 0x004C1EE0); |
| 143 |
|
DefFunc(void, M3rDraw_Bitmap, ONICALL, (void* inBitmap, const M3tPointScreen* inDestPoint, UUtUns16 inWidth, UUtUns16 inHeight, UUtUns32 inShade, UUtUns16 inAlpha), 0x0041f4a0); |
| 144 |
|
|
| 145 |
|
DefFunc(void, M3rGeom_Line_Light, ONICALL, (const M3tPoint3D *point1, const M3tPoint3D *point2, uint32_t shade), 0x0041f440); |
| 149 |
– |
/* |
| 150 |
– |
DefFunc(void, M3rGeom_Line_Light, ONICALL, (), 0x0041f440); |
| 151 |
– |
DefFunc(void, M3rMatrixStack_Push, ONICALL, (), 0x0041baa0); |
| 152 |
– |
DefFunc(void, M3rMatrixStack_Get, ONICALL, (), 0x0041bb20); |
| 153 |
– |
DefFunc(void, M3rMatrixStack_Pop, ONICALL, (), 0x0041bb30); |
| 154 |
– |
DefFunc(void, M3rMatrixStack_Identity, ONICALL, (), 0x0041bba0); |
| 155 |
– |
DefFunc(void, M3rMatrixStack_Rotate, ONICALL, (), 0x0041bbe0); |
| 156 |
– |
DefFunc(void, M3rMatrixStack_UniformScale, ONICALL, (), 0x0041bc20); |
| 157 |
– |
DefFunc(void, M3rMatrixStack_Translate, ONICALL, (), 0x0041bc40); |
| 158 |
– |
DefFunc(void, M3rMatrixStack_Multiply, ONICALL, (), 0x0041bc70); |
| 159 |
– |
DefFunc(void, M3rGeom_State_Commit, ONICALL, (), 0x0041e870); |
| 160 |
– |
|
| 161 |
– |
DefFunc(void, MUrPoint_Distance, ONICALL, (), 0x00433270); |
| 162 |
– |
*/ |
| 146 |
|
|
| 147 |
|
// Make a dialog element (in)visible and change its position |
| 148 |
|
DefFunc(void, WMrWindow_SetVisible, ONICALL, (void* window, int visibility), 0x00475a10); |
| 170 |
|
// Terminates platform-specific local-input. |
| 171 |
|
DefFunc(void, LIrPlatform_Terminate, ONICALL, (void), 0x00403620); |
| 172 |
|
|
| 173 |
+ |
// Key_config callback for each mapping found |
| 174 |
+ |
DefFunc(uint16_t, LIrBinding_Add, ONICALL, (uint32_t key, const char* name), 0x00403c60); |
| 175 |
+ |
|
| 176 |
+ |
// Called when processing key input |
| 177 |
+ |
DefFunc(void, LIrActionBuffer_Add, ONICALL, (void* unknown, LItDeviceInput* input), 0x00403b30); |
| 178 |
+ |
|
| 179 |
+ |
// Called during the game loop to run the Windows message loop |
| 180 |
+ |
DefFunc(UUtBool, LIiPlatform_InputEvent_GetEvent, ONICALL, (void), 0x004036d0); |
| 181 |
+ |
|
| 182 |
+ |
// Called by the game loop to get the latest input frames |
| 183 |
+ |
DefFunc(void, LIrActionBuffer_Get, ONICALL, (short* count, LItActionBuffer **buffers), 0x00403be0); |
| 184 |
+ |
|
| 185 |
+ |
// Gets the mouse position |
| 186 |
+ |
DefFunc(void, LIrPlatform_InputEvent_GetMouse, ONICALL, (int active, LItInputEvent *info), 0x00402ca0); |
| 187 |
+ |
|
| 188 |
+ |
// Checks if a keyboard key is pressed |
| 189 |
+ |
DefFunc(UUtBool, LIrPlatform_TestKey, ONICALL, (int key, int active), 0x00403930); |
| 190 |
+ |
|
| 191 |
+ |
// Translates a key name (from key_config.txt) to a key code |
| 192 |
+ |
DefFunc(int, LIrTranslate_InputName, ONICALL, (char *name), 0x00403a90); |
| 193 |
+ |
|
| 194 |
+ |
// Updates TargetGameTime in the game state |
| 195 |
+ |
DefFunc(void, ONrGameState_UpdateServerTime, ONICALL, (GameState *game_state), 0x004fbeb0); |
| 196 |
+ |
|
| 197 |
+ |
// Basically stricmp, but it only ever does ASCII case folding |
| 198 |
+ |
DefFunc(int, UUrString_Compare_NoCase, ONICALL, (const char *str1, const char *str2), 0x004266d0); |
| 199 |
+ |
|
| 200 |
+ |
// A safe strcpy which lets you specify the size of the target buffer and always |
| 201 |
+ |
// NUL-terminates. Kind of like strlcpy. Just don't call it with dest_size = 0. |
| 202 |
+ |
DefFunc(void, UUrString_Copy, ONICALL, (char *dest, const char *src, size_t dest_size), 0x004265f0); |
| 203 |
+ |
|
| 204 |
|
#undef DefFunc |
| 205 |
|
|
| 206 |
|
#endif |