[992] | 1 | #ifndef ONI_H
|
---|
| 2 | #error Do not include this file directly, include Oni/Oni.h instead!
|
---|
| 3 | #endif
|
---|
| 4 |
|
---|
| 5 | #ifndef SYMBOLS_FUNC_H
|
---|
| 6 | #define SYMBOLS_FUNC_H
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 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
|
---|
[995] | 12 | DefFunc(int64_t, UUrMachineTime_High, ONICALL, (), 0x00426480);
|
---|
| 13 | DefFunc(double, UUrMachineTime_High_Frequency, ONICALL, (), 0x004264b0);
|
---|
| 14 | DefFunc(int64_t, UUrMachineTime_Sixtieths, ONICALL, (), 0x004263e0);
|
---|
[992] | 15 |
|
---|
| 16 | // Code to initialize platform stuff (like disabling system key combination Alt+Tab)
|
---|
[995] | 17 | DefFunc(void, UUrPlatform_Initialize, ONICALL, (), 0x00426010);
|
---|
| 18 | DefFunc(void, UUrPlatform_Terminate, ONICALL, (), 0x00426310);
|
---|
[992] | 19 |
|
---|
| 20 | // Oni's file access methods
|
---|
| 21 | DefFunc(FILE*, oni_fopen, __cdecl, (const char*, const char*), 0x0051ea9f);
|
---|
| 22 | DefFunc(int, oni_fprintf, __cdecl, (FILE*, const char*, ...), 0x0051ebbf);
|
---|
| 23 | DefFunc(int, oni_fflush, __cdecl, (FILE*), 0x0051eab2);
|
---|
| 24 |
|
---|
| 25 | // Oni's main method?
|
---|
| 26 | DefFunc(void, ONiMain, __cdecl, (int ArgCount, char *ArgList[]), 0x004d3280);
|
---|
| 27 |
|
---|
| 28 | DefFunc(uint16_t, CLrGetCommandLine, ONICALL, (int inArgc, const char* inArgv[], char*** outArgV), 0x0043ffd0);
|
---|
| 29 |
|
---|
| 30 | // Initialization code, used to hook in windowed modes
|
---|
| 31 | DefFunc(short, ONrPlatform_Initialize, ONICALL, (ONtPlatformData *PlatformData), 0x0050f670);
|
---|
| 32 | DefFunc(LRESULT, ONrPlatform_WindowProc, CALLBACK, (HWND Window, UINT Message, WPARAM WParam, LPARAM LParam), 0x0050f7a0);
|
---|
| 33 |
|
---|
| 34 | // Retrieves a list of resolutions, replaced by "daodan_enumerate_valid_display_modes"
|
---|
| 35 | DefFunc(unsigned int, gl_enumerate_valid_display_modes, ONICALL, (M3tDisplayMode modes[16]), 0x004083a0);
|
---|
| 36 | DefFunc(int, gl_platform_set_pixel_format, ONICALL, (HDC hdc), 0x00407b50);
|
---|
| 37 |
|
---|
| 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);
|
---|
[995] | 41 | DefFunc(void, gl_platform_dispose, ONICALL, (void), 0x00408210);
|
---|
[992] | 42 |
|
---|
| 43 | // Retrieve gamma value from settings
|
---|
| 44 | DefFunc(float, ONrPersist_GetGamma, ONICALL, (), 0x0050f450);
|
---|
| 45 |
|
---|
| 46 | // Retrieve if the game was completed
|
---|
| 47 | DefFunc(uint8_t, ONrPersist_GetWonGame, ONICALL, (), 0x0050f660);
|
---|
| 48 |
|
---|
| 49 | // Print a message to the startup.txt log
|
---|
| 50 | DefFunc(void, UUrStartupMessage, __cdecl, (const char* fmt, ...), 0x00424860);
|
---|
| 51 |
|
---|
| 52 | // Probably to spawn a new character
|
---|
| 53 | DefFunc(int16_t, ONrGameState_NewCharacter, ONICALL, (void* CHAR, void* AISA, void* flag, uint32_t* list_location), 0x004dac50);
|
---|
| 54 |
|
---|
| 55 | // Remove character
|
---|
| 56 | DefFunc(void, ONrGameState_DeleteCharacter, ONICALL, (Character *inCharacter), 0x004DC480);
|
---|
| 57 |
|
---|
| 58 | DefFunc(void, ONrGameState_Timer_Start, ONICALL, (char* function, int time), 0x004FD370);
|
---|
[1163] | 59 | DefFunc(void, ONrGameState_HandleUtilityInput, ONICALL, (GameInput *input), 0x004f6200);
|
---|
[992] | 60 | DefFunc(uint8_t, ONrDebugKey_WentDown, ONICALL, (uint32_t inKey), 0x005050d0);
|
---|
| 61 |
|
---|
| 62 | // Get active (player?) character
|
---|
| 63 | DefFunc(ActiveCharacter*, ONrGetActiveCharacter, ONICALL, (void* CharacterPtr), 0x004f1180);
|
---|
| 64 |
|
---|
| 65 | DefFunc(uint32_t, ONrCharacter_GetHealthShade, ONICALL, (uint32_t health, uint32_t maxhealth), 0x004EF450);
|
---|
| 66 | DefFunc(void, ONrCharacter_NewAnimationHook, ONICALL, (Character *ioCharacter, ActiveCharacter *ioActiveCharacter), 0x004E97A0);
|
---|
| 67 | DefFunc(void, ONrCharacter_SetAnimationExternal, ONICALL, (Character *ioCharacter, short state, void* animation, int interpolation), 0x004EB340);
|
---|
| 68 | DefFunc(void, ONrCharacter_SetHitPoints, ONICALL, (Character *ioCharacter, uint32_t inHitPoints), 0x004EB220);
|
---|
| 69 | DefFunc(void, ONrCharacter_SetCharacterClass, ONICALL, (Character* Char, ONCC* Class), 0x004D7C30);
|
---|
| 70 | DefFunc(void, ONrCorpse_Create, ONICALL, (Character* Character), 0x004EF340);
|
---|
| 71 |
|
---|
| 72 |
|
---|
| 73 | // Print message to console
|
---|
| 74 | DefFunc(void, COrTextArea_Print, ONICALL, (void* area, uint32_t priority, uint32_t textshade, uint32_t textshadowshade, const char* text, uint32_t unk_alwaws_0, uint32_t fadetime), 0x00431340);
|
---|
| 75 | DefFunc(int16_t, COrTextArea_Resize, ONICALL, (void* inTextArea, UUtRect* inBounds, int16_t inNumTextEntries), 0x00431460);
|
---|
| 76 |
|
---|
| 77 | // Original cheat function
|
---|
| 78 | DefFunc(uint8_t, ONrCheater, ONICALL, (uint32_t cheat), 0x004f5c30);
|
---|
| 79 |
|
---|
| 80 | DefFunc(int16_t, ONrMechanics_Register, ONICALL, (uint32_t inObjectType, uint32_t inObjectTypeIndex, char* inGroupName,
|
---|
| 81 | uint32_t inSizeInMemory, OBJtMethods* inObjectMethods, uint32_t inFlags, void* inMechanicsMethods), 0x00507450);
|
---|
| 82 | DefFunc(int16_t, OBJrTriggerVolume_IntersectsCharacter, ONICALL, (const OBJtObject* inObject, uint32_t inMask, const void* inCharacter), 0x004cc680);
|
---|
| 83 |
|
---|
| 84 |
|
---|
| 85 | // ?
|
---|
| 86 | DefFunc(int, AUrMessageBox, __cdecl, (int Buttons, char *Message, ...), 0x004378c0);
|
---|
| 87 | DefFunc(char*, SSrMessage_Find, ONICALL, (char* message_key), 0x0047F550);
|
---|
| 88 | DefFunc(void, ONiGameState_FindAutoPromptMessage, ONICALL, (char* Note, void* ptr), 0x004FDBE0);
|
---|
| 89 |
|
---|
| 90 | // Register a BSL function with a return type
|
---|
| 91 | DefFunc(uint16_t, SLrScript_Command_Register_ReturnType, ONICALL, (char* name, char* desc, char* argfmt, sl_type type, sl_func callback), 0x00477b20);
|
---|
| 92 |
|
---|
| 93 | // Register a BSL function without a return value
|
---|
| 94 | DefFunc(uint16_t, SLrScript_Command_Register_Void, ONICALL, (char* name, char* desc, char* argfmt, sl_func callback), 0x00477b40);
|
---|
| 95 |
|
---|
| 96 | // Register a global BSL variable
|
---|
| 97 | DefFunc(uint16_t, SLrGlobalVariable_Register_Bool, ONICALL, (char* name, char* desc, UUtBool* data), 0x00477f50);
|
---|
| 98 | DefFunc(uint16_t, SLrGlobalVariable_Register_Int32, ONICALL, (char* name, char* desc, int32_t* data), 0x00477e30);
|
---|
| 99 | DefFunc(uint16_t, SLrGlobalVariable_Register_Float, ONICALL, (char* name, char* desc, float* data), 0x00477ec0);
|
---|
| 100 | DefFunc(uint16_t, SLrGlobalVariable_Register_String, ONICALL, (char* name, char* desc, char* data), 0x00477fe0);
|
---|
| 101 |
|
---|
| 102 | // Print message to console ?
|
---|
[1017] | 103 | DefFunc(int, COrMessage_Print, ONICALL, (const char* Message, const char* Key, uint32_t fadeTime), 0x004304B0);
|
---|
[992] | 104 | DefFunc(UUtBool, COrCommand_Execute, ONICALL, (char* command), 0x004317D0);
|
---|
| 105 |
|
---|
| 106 | DefFunc(void, COrConsole_StatusLine_Display, ONICALL, (), 0x00431E70);
|
---|
| 107 |
|
---|
| 108 | // Get pointer to specified data instance
|
---|
| 109 | DefFunc(int16_t, TMrInstance_GetDataPtr, ONICALL, (int tag, char* name, void* pointer), 0x004232E0);
|
---|
| 110 |
|
---|
| 111 | // Get name of data instance pointed to
|
---|
| 112 | DefFunc(char*, TMrInstance_GetInstanceName, ONICALL, (void* InstancePointer), 0x00423D90);
|
---|
| 113 |
|
---|
| 114 | DefFunc(short, TMrInstance_GetDataPtr_ByNumber, ONICALL, (int tag, int number, void** out), 0x00423680);
|
---|
| 115 | DefFunc(uint32_t, TMrInstance_GetTagCount, ONICALL, (int tag), 0x004236F0);
|
---|
| 116 |
|
---|
| 117 | // Draw text on the screen
|
---|
| 118 | DefFunc(int16_t, TSrContext_DrawText, ONICALL, (void* TSrContext, char* Text, char alpha, uint32_t usuallyzero, void* pRect), 0x0042DF00);
|
---|
| 119 | DefFunc(int16_t, TSrContext_New, ONICALL, (void* FontInstance, int size, int hthsik1,int hthsik2,int hthsik3, void* TSrContext), 0x0042EA30);
|
---|
| 120 | DefFunc(int16_t, TSrContext_SetFontSize, ONICALL, (void* ioTextContext, uint16_t inSize), 0x0042ED50);
|
---|
| 121 | DefFunc(int16_t, TSrContext_SetShade, ONICALL, (void* ioTextContext, uint32_t inShade), 0x0042EE50);
|
---|
| 122 |
|
---|
| 123 | DefFunc(uint16_t, TRrAnimation_GetDuration, ONICALL, (void* Animation), 0x00428740);
|
---|
| 124 | DefFunc(uint16_t, TRrAnimation_GetTo, ONICALL, (void* Animation), 0x00428730);
|
---|
| 125 | DefFunc(uint16_t, TRrAnimation_GetFrom, ONICALL, (void* Animation), 0x00428720);
|
---|
| 126 |
|
---|
| 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 |
|
---|
| 131 | DefFunc(int, OBJrObjectType_EnumerateObjects, ONICALL, (int inObjectType, OBJtEnumCallback_Object inEnumCallback, int inUserData), 0x004D0080);
|
---|
| 132 |
|
---|
| 133 | DefFunc(void, OBJrDoor_Open, ONICALL, (DoorObject *inObject, Character *inCharacter), 0x004C26C0);
|
---|
| 134 | DefFunc(void, OBJrDoor_ForceOpen, ONICALL, (short id), 0x004C1EE0);
|
---|
| 135 | DefFunc(short, OBJrConsole_OnActivate, ONICALL, (void *inObject, Character *inCharacter), 0x004C0880);
|
---|
| 136 | DefFunc(void*, OBJrConsole_GetByID, ONICALL, (short ID), 0x004C0950);
|
---|
| 137 |
|
---|
| 138 |
|
---|
| 139 | DefFunc(void, ONiDrawWeaponSight, ONICALL, (Character* Char), 0x004E1900);
|
---|
| 140 | DefFunc(void, AI2rDisplayDebuggingInfo, ONICALL, (Character* Char), 0x0048C5F0);
|
---|
| 141 | DefFunc(uint32_t, M3rTextureMap_New, ONICALL, (short width, short height, int type, int allocated, int flags, char* name, void** output), 0x0041EB00);
|
---|
| 142 | DefFunc(void, M3rDraw_BigBitmap, ONICALL, (M3tTextureMap_Big* inBigBitmap, const M3tPointScreen *inDestPoint, UUtUns16 inWidth, UUtUns16 inHeight, UUtUns32 inShade, UUtUns16 inAlpha), 0x0041f6e0);
|
---|
| 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);
|
---|
| 146 |
|
---|
| 147 | // Make a dialog element (in)visible and change its position
|
---|
| 148 | DefFunc(void, WMrWindow_SetVisible, ONICALL, (void* window, int visibility), 0x00475a10);
|
---|
| 149 | DefFunc(void, WMrWindow_SetLocation, ONICALL, (void* window, int x, int y), 0x004756d0);
|
---|
| 150 |
|
---|
| 151 | // Plays movie using Bink blitting method (ie., non-OpenGL blitting).
|
---|
| 152 | DefFunc(void, ONrMovie_Play, ONICALL, (const char* movie, int unknown), 0x004d5580);
|
---|
| 153 |
|
---|
| 154 | // Sets minimum and maximum values for a slider control.
|
---|
| 155 | DefFunc(void, WMrSlider_SetRange, ONICALL, (void* window, int min_value, int max_value), 0x00472650);
|
---|
| 156 |
|
---|
| 157 | // Enables or disables window.
|
---|
| 158 | DefFunc(void, WMrWindow_SetEnabled, ONICALL, (void* window, UUtBool enabled), 0x00475580);
|
---|
| 159 |
|
---|
| 160 | // Sets gamma to specified factor (0.0 .. 1.0).
|
---|
| 161 | DefFunc(void, M3rSetGamma, ONICALL, (float factor), 0x00407a60);
|
---|
| 162 |
|
---|
| 163 | // Resets gl_api pointers, unloads OPENGL32.DLL.
|
---|
| 164 | DefFunc(void, gl_unload_library, ONICALL, (void), 0x0040ac40);
|
---|
| 165 |
|
---|
| 166 | // Notifies platform-specific local input implementation about internal (ie.,
|
---|
| 167 | // real) input mode change.
|
---|
| 168 | DefFunc(void, LIrPlatform_Mode_Set, ONICALL, (unsigned int active_mode), 0x00402cf0);
|
---|
| 169 |
|
---|
| 170 | // Terminates platform-specific local-input.
|
---|
| 171 | DefFunc(void, LIrPlatform_Terminate, ONICALL, (void), 0x00403620);
|
---|
| 172 |
|
---|
[1017] | 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 |
|
---|
[1163] | 179 | // Called during the game loop to run the Windows message loop
|
---|
| 180 | DefFunc(UUtBool, LIiPlatform_InputEvent_GetEvent, ONICALL, (void), 0x004036d0);
|
---|
[1017] | 181 |
|
---|
[1163] | 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 |
|
---|
[992] | 204 | #undef DefFunc
|
---|
| 205 |
|
---|
| 206 | #endif
|
---|