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 |
|
---|
128 | DefFunc( AUrMessageBox , 0x004378c0 );
|
---|
129 |
|
---|
130 | DefFunc( COrMessage_Print , 0x004304B0 );
|
---|
131 | DefFunc( COrTextArea_Print , 0x00431340 );
|
---|
132 |
|
---|
133 | DefFunc( ONiGameState_FindAutoPromptMessage , 0x004FDBE0 );
|
---|
134 | DefFunc( ONiMain , 0x004d3280 );
|
---|
135 |
|
---|
136 | DefFunc( ONrCheater , 0x004f5c30 );
|
---|
137 | DefFunc( ONrGameState_NewCharacter , 0x004dac50 );
|
---|
138 | DefFunc( ONrGetActiveCharacter , 0x004f1180 );
|
---|
139 | DefFunc( ONrPersist_GetGamma , 0x0050f450 );
|
---|
140 | DefFunc( ONrPersist_GetWonGame , 0x0050f660 );
|
---|
141 | DefFunc( ONrPlatform_Initialize , 0x0050f670 );
|
---|
142 | DefFunc( ONrPlatform_WindowProc , 0x0050f7a0 );
|
---|
143 | DefFunc( iSetCharacterClass , 0x004D99D0 );
|
---|
144 |
|
---|
145 |
|
---|
146 | DefFunc( SLrGlobalVariable_Register_Int32 , 0x0477e30);
|
---|
147 | DefFunc( SLrGlobalVariable_Register_Float , 0x0477ec0);
|
---|
148 | DefFunc( SLrGlobalVariable_Register_String , 0x0477fe0);
|
---|
149 | DefFunc( SLrScript_Command_Register_ReturnType , 0x0477b20);
|
---|
150 | DefFunc( SLrScript_Command_Register_Void , 0x0477b40);
|
---|
151 |
|
---|
152 | DefFunc( SSrMessage_Find , 0x0047F550 );
|
---|
153 |
|
---|
154 | DefFunc( TMrInstance_GetInstanceName , 0x00423D90 );
|
---|
155 | DefFunc( TMrInstance_GetDataPtr , 0x004232E0 );
|
---|
156 |
|
---|
157 | DefFunc( TSrContext_DrawText , 0x0042DF00 );
|
---|
158 | DefFunc( TSrContext_New , 0x0042EA30 );
|
---|
159 |
|
---|
160 |
|
---|
161 | DefFunc( UUrMachineTime_High , 0x04026480 );
|
---|
162 | DefFunc( UUrMachineTime_High_Frequency , 0x040264b0 );
|
---|
163 | DefFunc( UUrMachineTime_Sixtieths , 0x040263e0 );
|
---|
164 | DefFunc( UUrPlatform_Initialize , 0x04026010 );
|
---|
165 | DefFunc( UUrPlatform_Terminate , 0x04026310 );
|
---|
166 | DefFunc( UUrStartupMessage , 0x00424860 );
|
---|
167 |
|
---|
168 | #define DefVar(type, name, address) type* _##name = (type*)address
|
---|
169 |
|
---|
170 | DefVar( onibool, ai2_deaf, 0x005ec0c1 );
|
---|
171 |
|
---|
172 | DefVar( HINSTANCE, g_Instance, 0x0061F9E4 );
|
---|
173 |
|
---|
174 | DefVar( gl_api_t*, gl_api, 0x00560604 );
|
---|
175 | DefVar( gl_engine_t*, gl_eng, 0x00560600 );
|
---|
176 | DefVar( WORD*, gl_gamma_ramp, 0x0055fdfc );
|
---|
177 | DefVar( int, gl_gamma_ramp_valid, 0x005603fc );
|
---|
178 |
|
---|
179 | DefVar( char, opt_ignore_private_data,0x006370f0 );
|
---|
180 | DefVar( char, opt_sound, 0x006370fc );
|
---|
181 |
|
---|
182 | DefVar( char, AKgDebug_DebugMaps, 0x002b2204 );
|
---|
183 |
|
---|
184 | DefVar( bool, BFgDebugFileEnable, 0x0055c8d0 );
|
---|
185 |
|
---|
186 | DefVar( uint32_t, COgConsoleLines, 0x005cb468 );
|
---|
187 | DefVar( uint32_t, COgDefaultTextShade, 0x00533f70 );
|
---|
188 | DefVar( uint32_t, COgDefaultTextShadow, 0x00533f74 );
|
---|
189 | DefVar( uint32_t, COgFadeTimeValue, 0x00533f68 );
|
---|
190 |
|
---|
191 | DefVar( FILE*, ONgFileStartup, 0x005711b8 );
|
---|
192 | DefVar( GameState*, ONgGameState, 0x005ece7c );
|
---|
193 | DefVar( ONtPlatformData,ONgPlatformData, 0x0053100c );
|
---|
194 |
|
---|
195 | DefVar( char, M3gResolutionSwitch, 0x00531634 );
|
---|
196 |
|
---|
197 | DefVar( bool, SSgSearchOnDisk, 0x005eb758 );
|
---|
198 |
|
---|
199 | /*
|
---|
200 | extern gl_engine_t* gl;
|
---|
201 | extern gl_api_t* gl_api;
|
---|
202 | extern WORD gl_gamma_ramp[3 * 256];
|
---|
203 | extern int gl_gamma_ramp_valid;
|
---|
204 | */
|
---|
205 |
|
---|
206 | #undef DefVar
|
---|
207 | void _DDrDefine_Symbols() {
|
---|
208 |
|
---|
209 | }
|
---|