[567] | 1 | /*;symbol(name, value) .global name; .set name, 0x00400000 + value
|
---|
| 2 | symbol macro name, value
|
---|
| 3 | .global name
|
---|
| 4 | mov name, value
|
---|
| 5 | endm
|
---|
| 6 |
|
---|
| 7 | ;MSVC6.0 stdlib
|
---|
| 8 | DefVar( , _oni_malloc , 0x0051fc24 )
|
---|
| 9 | DefVar( , _oni_free , 0x0051fbf5 )
|
---|
| 10 |
|
---|
| 11 | DefVar( , _oni_fopen , 0x0051ea9f )
|
---|
| 12 | DefVar( , _oni_fflush , 0x0051eab2 )
|
---|
| 13 | DefVar( , _oni_fprintf , 0x0051ebbf )
|
---|
| 14 | DefVar( , _oni_vsprintf , 0x0051e860 )
|
---|
| 15 |
|
---|
| 16 | ;Oni Engine
|
---|
| 17 | DefVar( , _ONiMain , 0x004d3280 )
|
---|
| 18 | symbol ( @ONrPlatform_Initialize@4 , 0x0050f670 )
|
---|
| 19 | DefVar( , _ONrPlatform_WindowProc@16 , 0x0050f7a0 )
|
---|
| 20 | symbol ( @ONrCheater@4 , 0x004f5c30 )
|
---|
| 21 |
|
---|
| 22 | DefVar( , _g_Instance , 0x0021f9e4 )
|
---|
| 23 | DefVar( , _ONgPlatformData , 0x0023100c )
|
---|
| 24 | DefVar( , _ONgGameState , 0x005ece7c )
|
---|
| 25 | DefVar( , _ai2_deaf , 0x005ec0c1 )
|
---|
| 26 | DefVar( , _AKgDebug_DebugMaps , 0x002b2204 )
|
---|
| 27 | DefVar( , _BFgDebugFileEnable , 0x0055c8d0 )
|
---|
| 28 | DefVar( , _SSgSearchOnDisk , 0x005eb758 )
|
---|
| 29 |
|
---|
| 30 | DefVar( , _opt_sound , 0x002370fc )
|
---|
| 31 | DefVar( , _opt_ignore_private_data , 0x002370f0 )
|
---|
| 32 |
|
---|
| 33 | ;Oni Persistance
|
---|
| 34 | symbol ( @ONrPersist_GetGamma@0 , 0x0050f450 )
|
---|
| 35 | symbol ( @ONrPersist_GetWonGame@0 , 0x0050f660 )
|
---|
| 36 |
|
---|
| 37 | ;BFW_Utility
|
---|
| 38 | DefVar( , _UUrStartupMessage , 0x00424860 )
|
---|
| 39 | symbol ( @UUrMachineTime_High@0 , 0x00426480 )
|
---|
| 40 | symbol ( @UUrMachineTime_High_Frequency@0 , 0x004264b0 )
|
---|
| 41 | symbol ( @UUrMachineTime_Sixtieths@0 , 0x004263e0 )
|
---|
| 42 | symbol ( @UUrPlatform_Initialize@0 , 0x00426010 )
|
---|
| 43 | symbol ( @UUrPlatform_Terminate@0 , 0x00426310 )
|
---|
| 44 | DefVar( , _AUrMessageBox , 0x004378c0 )
|
---|
| 45 |
|
---|
| 46 | DefVar( , _ONgFileStartup , 0x005711b8 )
|
---|
| 47 |
|
---|
| 48 | LMotoko
|
---|
| 49 |
|
---|
| 50 | DefVar( , _M3gResolutionSwitch , 0x00531634 )
|
---|
| 51 |
|
---|
| 52 | L OpenGL
|
---|
| 53 | symbol ( @gl_enumerate_valid_display_modes@4 , 0x004083a0 )
|
---|
| 54 | symbol ( @gl_platform_set_pixel_format@4 , 0x00407b50 )
|
---|
| 55 | symbol ( @gl_platform_initialize@0 , 0x00407da0 )
|
---|
| 56 |
|
---|
| 57 |
|
---|
| 58 |
|
---|
| 59 | ; Character
|
---|
| 60 | symbol ( @ONrGameState_NewCharacter@16 , 0x004dac50 )
|
---|
| 61 | symbol ( @ONrGameState_GetPlayerCharacter@0 , 0x004b63a7 )
|
---|
| 62 | symbol ( @ONrGetActiveCharacter@4 , 0x004f1180 )
|
---|
| 63 |
|
---|
| 64 | ; Console
|
---|
| 65 | symbol ( @TSrContext_DrawText@20 , 0x0042DF00 )
|
---|
| 66 | symbol ( @TSrContext_New@24 , 0x0042EA30 )
|
---|
| 67 | symbol ( @TMrInstance_GetDataPtr@12 , 0x004232E0 )
|
---|
| 68 | symbol ( @TMrInstance_GetInstanceName@4 , 0x00423D90 )
|
---|
| 69 | symbol ( @COrTextArea_Print@28 , 0x00431340 )
|
---|
| 70 |
|
---|
| 71 | DefVar( , _COgConsoleLines , 0x005cb468 )
|
---|
| 72 | DefVar( , _COgFadeTimeValue , 0x00533f68 )
|
---|
| 73 | DefVar( , _COgDefaultTextShade , 0x00533f70 )
|
---|
| 74 | DefVar( , _COgDefaultTextShadow , 0x00533f74 )
|
---|
| 75 |
|
---|
| 76 | DefVar( , _TStColorFormattingCharacter , 0x00533DA0 )
|
---|
| 77 |
|
---|
| 78 | symbol ( @COrMessage_Print@12 , 0x004304B0 )
|
---|
| 79 | symbol ( @COrMessage_Remove@4 , 0x00430640 )
|
---|
| 80 |
|
---|
| 81 | ; ScriptingLanguage
|
---|
| 82 | ;symbol ( @SLrScript_Command_Register_ReturnType@20 , 0x00477b20 )
|
---|
| 83 | ;symbol ( @SLrScript_Command_Register_Void@16 , 0x00477b40 )
|
---|
| 84 | ;symbol ( @SLrGlobalVariable_Register_Int32@12 , 0x00477e30 )
|
---|
| 85 | ;symbol ( @SLrGlobalVariable_Register_Float@12 , 0x00477ec0 )
|
---|
| 86 | ;symbol ( @SLrGlobalVariable_Register_String@12 , 0x00477fe0 )
|
---|
| 87 |
|
---|
| 88 | ; Messages
|
---|
| 89 | symbol ( @SSrMessage_Find@4 , 0x0047F550 )
|
---|
| 90 | symbol ( @ONiGameState_FindAutoPromptMessage@8 , 0x004FDBE0 )
|
---|
| 91 |
|
---|
| 92 | ; Data
|
---|
| 93 | symbol ( @TMrInstance_GetDataPtr_List@16 , 0x00423540 )
|
---|
| 94 | */
|
---|
| 95 | #include "Daodan.h"
|
---|
| 96 | #include "Oni.h"
|
---|
| 97 |
|
---|
| 98 | //////////////////////////////////////////////////////////////////////
|
---|
| 99 | //Functions need:
|
---|
| 100 | //In Oni_Symbols.c
|
---|
| 101 | //1. DefFunc( name, address )
|
---|
| 102 | //In Oni_Symbols.h
|
---|
| 103 | //1. typedef return_type ( [calling_convention] *_name)( arguments );
|
---|
| 104 | //2. ExtFunc( name )
|
---|
| 105 | //////////////////////////////////////////////////////////////////////
|
---|
| 106 | //Variables need:
|
---|
| 107 | //In Oni_Symbols.c
|
---|
| 108 | //1. DefVar( type, name, address );
|
---|
| 109 | //In Oni_Symbols.h
|
---|
| 110 | //1. DefVar( type, name, address <ignored> );
|
---|
| 111 | //2. #define name *(_name)
|
---|
| 112 | //Please do not use variable names that could be parts of other
|
---|
| 113 | //names like "gl". That will screw things up. If you insist on doing
|
---|
| 114 | //this, omit the #define step and dereference them yourself.
|
---|
| 115 | //////////////////////////////////////////////////////////////////////
|
---|
| 116 | //Please keep everything alphabatized. Kthanxbai
|
---|
| 117 | //////////////////////////////////////////////////////////////////////
|
---|
| 118 |
|
---|
| 119 | #define DefFunc(name, address) _##name name = (_##name)address
|
---|
| 120 | DefFunc( gl_enumerate_valid_display_modes , 0x004083a0 );
|
---|
| 121 | DefFunc( gl_platform_set_pixel_format , 0x00407b50 );
|
---|
| 122 | DefFunc( gl_platform_initialize , 0x00407da0 );
|
---|
| 123 |
|
---|
| 124 | DefFunc( oni_fopen , 0x0051ea9f );
|
---|
| 125 | DefFunc( oni_fflush , 0x0051eab2 );
|
---|
| 126 | DefFunc( oni_fprintf , 0x0051ebbf );
|
---|
| 127 |
|
---|
[573] | 128 |
|
---|
| 129 | DefFunc( AI2iScript_Spawn , 0x004B4780 );
|
---|
[567] | 130 | DefFunc( AUrMessageBox , 0x004378c0 );
|
---|
| 131 |
|
---|
| 132 | DefFunc( COrMessage_Print , 0x004304B0 );
|
---|
| 133 | DefFunc( COrTextArea_Print , 0x00431340 );
|
---|
[574] | 134 | //DefFunc( COrConsole_StatusLine_Display , 0x00431E70 );
|
---|
[573] | 135 |
|
---|
| 136 | DefFunc( OBJrObjectType_EnumerateObjects , 0x004D0080 );
|
---|
| 137 | //DefFunc( OBJiObjectGroup_GetNumObjects ,
|
---|
| 138 |
|
---|
[574] | 139 | //DefFunc( ONiGameState_FindAutoPromptMessage , 0x004FDBE0 );
|
---|
[567] | 140 | DefFunc( ONiMain , 0x004d3280 );
|
---|
| 141 |
|
---|
[573] | 142 | DefFunc( ONrCharacter_NewAnimationHook , 0x004E97A0 );
|
---|
[567] | 143 | DefFunc( ONrCheater , 0x004f5c30 );
|
---|
[573] | 144 | DefFunc( ONrCorpse_Create , 0x004EF340 );
|
---|
[567] | 145 | DefFunc( ONrGameState_NewCharacter , 0x004dac50 );
|
---|
[573] | 146 | DefFunc( ONrGameState_DeleteCharacter , 0x004DC480 );
|
---|
[567] | 147 | DefFunc( ONrGetActiveCharacter , 0x004f1180 );
|
---|
| 148 | DefFunc( ONrPersist_GetGamma , 0x0050f450 );
|
---|
| 149 | DefFunc( ONrPersist_GetWonGame , 0x0050f660 );
|
---|
| 150 | DefFunc( ONrPlatform_Initialize , 0x0050f670 );
|
---|
| 151 | DefFunc( ONrPlatform_WindowProc , 0x0050f7a0 );
|
---|
[573] | 152 | DefFunc( ONrCharacter_SetHitPoints , 0x004EB220 );
|
---|
| 153 |
|
---|
[568] | 154 | DefFunc( iSetCharacterClass , 0x004D99D0 );
|
---|
[567] | 155 |
|
---|
[568] | 156 |
|
---|
[573] | 157 | DefFunc( SLrGlobalVariable_Register_Int32 , 0x00477e30 );
|
---|
| 158 | DefFunc( SLrGlobalVariable_Register_Float , 0x00477ec0 );
|
---|
| 159 | DefFunc( SLrGlobalVariable_Register_String , 0x00477fe0 );
|
---|
| 160 | DefFunc( SLrScript_Command_Register_ReturnType , 0x00477b20 );
|
---|
| 161 | DefFunc( SLrScript_Command_Register_Void , 0x00477b40 );
|
---|
[567] | 162 |
|
---|
| 163 | DefFunc( SSrMessage_Find , 0x0047F550 );
|
---|
| 164 |
|
---|
| 165 | DefFunc( TMrInstance_GetInstanceName , 0x00423D90 );
|
---|
| 166 | DefFunc( TMrInstance_GetDataPtr , 0x004232E0 );
|
---|
| 167 |
|
---|
[573] | 168 | DefFunc( TSrContext_DrawText , 0x0042DF00 );
|
---|
| 169 | DefFunc( TSrContext_New , 0x0042EA30 );
|
---|
| 170 | DefFunc( TSrContext_SetShade , 0x0042EE50 );
|
---|
| 171 | DefFunc( TRrAnimation_GetDuration , 0x00428740 );
|
---|
| 172 | DefFunc( TRrAnimation_GetFrom , 0x00428720 );
|
---|
| 173 | DefFunc( TRrAnimation_GetTo , 0x00428730 );
|
---|
[567] | 174 |
|
---|
| 175 | DefFunc( UUrMachineTime_High , 0x04026480 );
|
---|
| 176 | DefFunc( UUrMachineTime_High_Frequency , 0x040264b0 );
|
---|
| 177 | DefFunc( UUrMachineTime_Sixtieths , 0x040263e0 );
|
---|
| 178 | DefFunc( UUrPlatform_Initialize , 0x04026010 );
|
---|
| 179 | DefFunc( UUrPlatform_Terminate , 0x04026310 );
|
---|
| 180 | DefFunc( UUrStartupMessage , 0x00424860 );
|
---|
[573] | 181 | DefFunc( OBJrDoor_Open , 0x004C26C0 );
|
---|
| 182 | DefFunc( OBJrDoor_ForceOpen , 0x004C1EE0 );
|
---|
[574] | 183 | //DefFunc( OBJrConsole_GetByID , 0x004C0950 );
|
---|
| 184 | DefFunc( OBJrConsole_OnActivate , 0x004C0880 );
|
---|
[567] | 185 |
|
---|
[574] | 186 | #define DefVar(type, name, address) //type* _##name = (type*)address
|
---|
[567] | 187 |
|
---|
| 188 | DefVar( onibool, ai2_deaf, 0x005ec0c1 );
|
---|
| 189 |
|
---|
[569] | 190 | DefVar( HINSTANCE, g_Instance, 0x0061F9E4 );
|
---|
[567] | 191 |
|
---|
| 192 | DefVar( gl_api_t*, gl_api, 0x00560604 );
|
---|
| 193 | DefVar( gl_engine_t*, gl_eng, 0x00560600 );
|
---|
| 194 | DefVar( WORD*, gl_gamma_ramp, 0x0055fdfc );
|
---|
| 195 | DefVar( int, gl_gamma_ramp_valid, 0x005603fc );
|
---|
| 196 |
|
---|
| 197 | DefVar( char, opt_ignore_private_data,0x006370f0 );
|
---|
| 198 | DefVar( char, opt_sound, 0x006370fc );
|
---|
| 199 |
|
---|
| 200 | DefVar( char, AKgDebug_DebugMaps, 0x002b2204 );
|
---|
| 201 |
|
---|
| 202 | DefVar( bool, BFgDebugFileEnable, 0x0055c8d0 );
|
---|
| 203 |
|
---|
| 204 | DefVar( uint32_t, COgConsoleLines, 0x005cb468 );
|
---|
| 205 | DefVar( uint32_t, COgDefaultTextShade, 0x00533f70 );
|
---|
| 206 | DefVar( uint32_t, COgDefaultTextShadow, 0x00533f74 );
|
---|
| 207 | DefVar( uint32_t, COgFadeTimeValue, 0x00533f68 );
|
---|
| 208 |
|
---|
| 209 | DefVar( FILE*, ONgFileStartup, 0x005711b8 );
|
---|
| 210 | DefVar( GameState*, ONgGameState, 0x005ece7c );
|
---|
| 211 | DefVar( ONtPlatformData,ONgPlatformData, 0x0053100c );
|
---|
| 212 |
|
---|
| 213 | DefVar( char, M3gResolutionSwitch, 0x00531634 );
|
---|
| 214 |
|
---|
| 215 | DefVar( bool, SSgSearchOnDisk, 0x005eb758 );
|
---|
| 216 |
|
---|
| 217 | /*
|
---|
| 218 | extern gl_engine_t* gl;
|
---|
| 219 | extern gl_api_t* gl_api;
|
---|
| 220 | extern WORD gl_gamma_ramp[3 * 256];
|
---|
| 221 | extern int gl_gamma_ramp_valid;
|
---|
| 222 | */
|
---|
| 223 |
|
---|
| 224 | #undef DefVar
|
---|
| 225 | void _DDrDefine_Symbols() {
|
---|
| 226 |
|
---|
| 227 | }
|
---|