--- Daodan/src/Oni/Symbols_Func.h 2014/04/05 10:19:11 992 +++ Daodan/src/Oni/Symbols_Func.h 2021/10/24 02:50:48 1163 @@ -9,13 +9,13 @@ #define DefFunc( type, name, callingconvention, args, address) typedef type ( callingconvention * _##name ) args; static const _##name name = (_##name)address // Orig timing functions, replaced by DDrMachineTime_* if option "usegettickcount" is enabled -DefFunc(int64_t, UUrMachineTime_High, ONICALL, (), 0x04026480); -DefFunc(double, UUrMachineTime_High_Frequency, ONICALL, (), 0x040264b0); -DefFunc(int64_t, UUrMachineTime_Sixtieths, ONICALL, (), 0x040263e0); +DefFunc(int64_t, UUrMachineTime_High, ONICALL, (), 0x00426480); +DefFunc(double, UUrMachineTime_High_Frequency, ONICALL, (), 0x004264b0); +DefFunc(int64_t, UUrMachineTime_Sixtieths, ONICALL, (), 0x004263e0); // Code to initialize platform stuff (like disabling system key combination Alt+Tab) -DefFunc(void, UUrPlatform_Initialize, ONICALL, (), 0x04026010); -DefFunc(void, UUrPlatform_Terminate, ONICALL, (), 0x04026310); +DefFunc(void, UUrPlatform_Initialize, ONICALL, (), 0x00426010); +DefFunc(void, UUrPlatform_Terminate, ONICALL, (), 0x00426310); // Oni's file access methods DefFunc(FILE*, oni_fopen, __cdecl, (const char*, const char*), 0x0051ea9f); @@ -38,7 +38,7 @@ DefFunc(int, gl_platform_set_pixel_forma // Original graphics initialization/cleanup functions patched to use // DD_GLrPlatform_Initialize/DD_GLrPlatform_Dispoose instead if daodangl is used. DefFunc(UUtBool, gl_platform_initialize, ONICALL, (void), 0x00407da0); -DefFunc(void, gl_platform_dispose, ONICALL, (void), 0x408210); +DefFunc(void, gl_platform_dispose, ONICALL, (void), 0x00408210); // Retrieve gamma value from settings DefFunc(float, ONrPersist_GetGamma, ONICALL, (), 0x0050f450); @@ -56,7 +56,7 @@ DefFunc(int16_t, ONrGameState_NewCharact DefFunc(void, ONrGameState_DeleteCharacter, ONICALL, (Character *inCharacter), 0x004DC480); DefFunc(void, ONrGameState_Timer_Start, ONICALL, (char* function, int time), 0x004FD370); -DefFunc(void, ONrGameState_HandleUtilityInput, ONICALL, (const void* inInput), 0x004f6200); +DefFunc(void, ONrGameState_HandleUtilityInput, ONICALL, (GameInput *input), 0x004f6200); DefFunc(uint8_t, ONrDebugKey_WentDown, ONICALL, (uint32_t inKey), 0x005050d0); // Get active (player?) character @@ -100,7 +100,7 @@ DefFunc(uint16_t, SLrGlobalVariable_Regi DefFunc(uint16_t, SLrGlobalVariable_Register_String, ONICALL, (char* name, char* desc, char* data), 0x00477fe0); // Print message to console ? -DefFunc(int, COrMessage_Print, ONICALL, (char* Message, char* Key, void* noidea), 0x004304B0); +DefFunc(int, COrMessage_Print, ONICALL, (const char* Message, const char* Key, uint32_t fadeTime), 0x004304B0); DefFunc(UUtBool, COrCommand_Execute, ONICALL, (char* command), 0x004317D0); DefFunc(void, COrConsole_StatusLine_Display, ONICALL, (), 0x00431E70); @@ -127,11 +127,8 @@ DefFunc(uint16_t, TRrAnimation_GetFrom, DefFunc(uint16_t, iSetCharacterClass, ONICALL, (sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret), 0x004D99D0); DefFunc(uint16_t, AI2iScript_Spawn, ONICALL, (sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret), 0x004B4780); DefFunc(void, AI2rSmite, ONICALL, (Character *inCharacter, UUtBool inSpareCharacter), 0x0048BDA0); -//NOT USED: DefFunc(void*, OBJrObjectType_GetObject_ByNumber, ONICALL, (int inObjectType, int inIndex), ); -//NOT USED: DefFunc(int, OBJiObjectGroup_GetNumObjects, ONICALL, (void *inObjectGroup), ); DefFunc(int, OBJrObjectType_EnumerateObjects, ONICALL, (int inObjectType, OBJtEnumCallback_Object inEnumCallback, int inUserData), 0x004D0080); -//DefFunc(void, OBJrTriggerVolume_IntersectsCharacter, ONICALL, (), 0x004cc680); DefFunc(void, OBJrDoor_Open, ONICALL, (DoorObject *inObject, Character *inCharacter), 0x004C26C0); DefFunc(void, OBJrDoor_ForceOpen, ONICALL, (short id), 0x004C1EE0); @@ -146,20 +143,6 @@ DefFunc(void, M3rDraw_BigBitmap, ONICALL DefFunc(void, M3rDraw_Bitmap, ONICALL, (void* inBitmap, const M3tPointScreen* inDestPoint, UUtUns16 inWidth, UUtUns16 inHeight, UUtUns32 inShade, UUtUns16 inAlpha), 0x0041f4a0); DefFunc(void, M3rGeom_Line_Light, ONICALL, (const M3tPoint3D *point1, const M3tPoint3D *point2, uint32_t shade), 0x0041f440); -/* -DefFunc(void, M3rGeom_Line_Light, ONICALL, (), 0x0041f440); -DefFunc(void, M3rMatrixStack_Push, ONICALL, (), 0x0041baa0); -DefFunc(void, M3rMatrixStack_Get, ONICALL, (), 0x0041bb20); -DefFunc(void, M3rMatrixStack_Pop, ONICALL, (), 0x0041bb30); -DefFunc(void, M3rMatrixStack_Identity, ONICALL, (), 0x0041bba0); -DefFunc(void, M3rMatrixStack_Rotate, ONICALL, (), 0x0041bbe0); -DefFunc(void, M3rMatrixStack_UniformScale, ONICALL, (), 0x0041bc20); -DefFunc(void, M3rMatrixStack_Translate, ONICALL, (), 0x0041bc40); -DefFunc(void, M3rMatrixStack_Multiply, ONICALL, (), 0x0041bc70); -DefFunc(void, M3rGeom_State_Commit, ONICALL, (), 0x0041e870); - -DefFunc(void, MUrPoint_Distance, ONICALL, (), 0x00433270); -*/ // Make a dialog element (in)visible and change its position DefFunc(void, WMrWindow_SetVisible, ONICALL, (void* window, int visibility), 0x00475a10); @@ -187,6 +170,37 @@ DefFunc(void, LIrPlatform_Mode_Set, ONIC // Terminates platform-specific local-input. DefFunc(void, LIrPlatform_Terminate, ONICALL, (void), 0x00403620); +// Key_config callback for each mapping found +DefFunc(uint16_t, LIrBinding_Add, ONICALL, (uint32_t key, const char* name), 0x00403c60); + +// Called when processing key input +DefFunc(void, LIrActionBuffer_Add, ONICALL, (void* unknown, LItDeviceInput* input), 0x00403b30); + +// Called during the game loop to run the Windows message loop +DefFunc(UUtBool, LIiPlatform_InputEvent_GetEvent, ONICALL, (void), 0x004036d0); + +// Called by the game loop to get the latest input frames +DefFunc(void, LIrActionBuffer_Get, ONICALL, (short* count, LItActionBuffer **buffers), 0x00403be0); + +// Gets the mouse position +DefFunc(void, LIrPlatform_InputEvent_GetMouse, ONICALL, (int active, LItInputEvent *info), 0x00402ca0); + +// Checks if a keyboard key is pressed +DefFunc(UUtBool, LIrPlatform_TestKey, ONICALL, (int key, int active), 0x00403930); + +// Translates a key name (from key_config.txt) to a key code +DefFunc(int, LIrTranslate_InputName, ONICALL, (char *name), 0x00403a90); + +// Updates TargetGameTime in the game state +DefFunc(void, ONrGameState_UpdateServerTime, ONICALL, (GameState *game_state), 0x004fbeb0); + +// Basically stricmp, but it only ever does ASCII case folding +DefFunc(int, UUrString_Compare_NoCase, ONICALL, (const char *str1, const char *str2), 0x004266d0); + +// A safe strcpy which lets you specify the size of the target buffer and always +// NUL-terminates. Kind of like strlcpy. Just don't call it with dest_size = 0. +DefFunc(void, UUrString_Copy, ONICALL, (char *dest, const char *src, size_t dest_size), 0x004265f0); + #undef DefFunc #endif