source: Daodan/MSVC/Oni_Symbols.c@ 569

Last change on this file since 569 was 569, checked in by gumby, 14 years ago

Fixes, fixes, everywhere

File size: 8.1 KB
Line 
1/*;symbol(name, value) .global name; .set name, 0x00400000 + value
2symbol macro name, value
3.global name
4mov name, value
5endm
6
7;MSVC6.0 stdlib
8DefVar( , _oni_malloc , 0x0051fc24 )
9DefVar( , _oni_free , 0x0051fbf5 )
10
11DefVar( , _oni_fopen , 0x0051ea9f )
12DefVar( , _oni_fflush , 0x0051eab2 )
13DefVar( , _oni_fprintf , 0x0051ebbf )
14DefVar( , _oni_vsprintf , 0x0051e860 )
15
16;Oni Engine
17DefVar( , _ONiMain , 0x004d3280 )
18symbol ( @ONrPlatform_Initialize@4 , 0x0050f670 )
19DefVar( , _ONrPlatform_WindowProc@16 , 0x0050f7a0 )
20symbol ( @ONrCheater@4 , 0x004f5c30 )
21
22DefVar( , _g_Instance , 0x0021f9e4 )
23DefVar( , _ONgPlatformData , 0x0023100c )
24DefVar( , _ONgGameState , 0x005ece7c )
25DefVar( , _ai2_deaf , 0x005ec0c1 )
26DefVar( , _AKgDebug_DebugMaps , 0x002b2204 )
27DefVar( , _BFgDebugFileEnable , 0x0055c8d0 )
28DefVar( , _SSgSearchOnDisk , 0x005eb758 )
29
30DefVar( , _opt_sound , 0x002370fc )
31DefVar( , _opt_ignore_private_data , 0x002370f0 )
32
33;Oni Persistance
34symbol ( @ONrPersist_GetGamma@0 , 0x0050f450 )
35symbol ( @ONrPersist_GetWonGame@0 , 0x0050f660 )
36
37;BFW_Utility
38DefVar( , _UUrStartupMessage , 0x00424860 )
39symbol ( @UUrMachineTime_High@0 , 0x00426480 )
40symbol ( @UUrMachineTime_High_Frequency@0 , 0x004264b0 )
41symbol ( @UUrMachineTime_Sixtieths@0 , 0x004263e0 )
42symbol ( @UUrPlatform_Initialize@0 , 0x00426010 )
43symbol ( @UUrPlatform_Terminate@0 , 0x00426310 )
44DefVar( , _AUrMessageBox , 0x004378c0 )
45
46DefVar( , _ONgFileStartup , 0x005711b8 )
47
48LMotoko
49
50DefVar( , _M3gResolutionSwitch , 0x00531634 )
51
52L OpenGL
53symbol ( @gl_enumerate_valid_display_modes@4 , 0x004083a0 )
54symbol ( @gl_platform_set_pixel_format@4 , 0x00407b50 )
55symbol ( @gl_platform_initialize@0 , 0x00407da0 )
56
57
58
59; Character
60symbol ( @ONrGameState_NewCharacter@16 , 0x004dac50 )
61symbol ( @ONrGameState_GetPlayerCharacter@0 , 0x004b63a7 )
62symbol ( @ONrGetActiveCharacter@4 , 0x004f1180 )
63
64; Console
65symbol ( @TSrContext_DrawText@20 , 0x0042DF00 )
66symbol ( @TSrContext_New@24 , 0x0042EA30 )
67symbol ( @TMrInstance_GetDataPtr@12 , 0x004232E0 )
68symbol ( @TMrInstance_GetInstanceName@4 , 0x00423D90 )
69symbol ( @COrTextArea_Print@28 , 0x00431340 )
70
71DefVar( , _COgConsoleLines , 0x005cb468 )
72DefVar( , _COgFadeTimeValue , 0x00533f68 )
73DefVar( , _COgDefaultTextShade , 0x00533f70 )
74DefVar( , _COgDefaultTextShadow , 0x00533f74 )
75
76DefVar( , _TStColorFormattingCharacter , 0x00533DA0 )
77
78symbol ( @COrMessage_Print@12 , 0x004304B0 )
79symbol ( @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
89symbol ( @SSrMessage_Find@4 , 0x0047F550 )
90symbol ( @ONiGameState_FindAutoPromptMessage@8 , 0x004FDBE0 )
91
92; Data
93symbol ( @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
120DefFunc( gl_enumerate_valid_display_modes , 0x004083a0 );
121DefFunc( gl_platform_set_pixel_format , 0x00407b50 );
122DefFunc( gl_platform_initialize , 0x00407da0 );
123
124DefFunc( oni_fopen , 0x0051ea9f );
125DefFunc( oni_fflush , 0x0051eab2 );
126DefFunc( oni_fprintf , 0x0051ebbf );
127
128DefFunc( AUrMessageBox , 0x004378c0 );
129
130DefFunc( COrMessage_Print , 0x004304B0 );
131DefFunc( COrTextArea_Print , 0x00431340 );
132
133DefFunc( ONiGameState_FindAutoPromptMessage , 0x004FDBE0 );
134DefFunc( ONiMain , 0x004d3280 );
135
136DefFunc( ONrCheater , 0x004f5c30 );
137DefFunc( ONrGameState_NewCharacter , 0x004dac50 );
138DefFunc( ONrGetActiveCharacter , 0x004f1180 );
139DefFunc( ONrPersist_GetGamma , 0x0050f450 );
140DefFunc( ONrPersist_GetWonGame , 0x0050f660 );
141DefFunc( ONrPlatform_Initialize , 0x0050f670 );
142DefFunc( ONrPlatform_WindowProc , 0x0050f7a0 );
143DefFunc( iSetCharacterClass , 0x004D99D0 );
144
145
146DefFunc( SLrGlobalVariable_Register_Int32 , 0x0477e30);
147DefFunc( SLrGlobalVariable_Register_Float , 0x0477ec0);
148DefFunc( SLrGlobalVariable_Register_String , 0x0477fe0);
149DefFunc( SLrScript_Command_Register_ReturnType , 0x0477b20);
150DefFunc( SLrScript_Command_Register_Void , 0x0477b40);
151
152DefFunc( SSrMessage_Find , 0x0047F550 );
153
154DefFunc( TMrInstance_GetInstanceName , 0x00423D90 );
155DefFunc( TMrInstance_GetDataPtr , 0x004232E0 );
156
157DefFunc( TSrContext_DrawText , 0x0042DF00 );
158DefFunc( TSrContext_New , 0x0042EA30 );
159
160
161DefFunc( UUrMachineTime_High , 0x04026480 );
162DefFunc( UUrMachineTime_High_Frequency , 0x040264b0 );
163DefFunc( UUrMachineTime_Sixtieths , 0x040263e0 );
164DefFunc( UUrPlatform_Initialize , 0x04026010 );
165DefFunc( UUrPlatform_Terminate , 0x04026310 );
166DefFunc( UUrStartupMessage , 0x00424860 );
167
168#define DefVar(type, name, address) type* _##name = (type*)address
169
170DefVar( onibool, ai2_deaf, 0x005ec0c1 );
171
172DefVar( HINSTANCE, g_Instance, 0x0061F9E4 );
173
174DefVar( gl_api_t*, gl_api, 0x00560604 );
175DefVar( gl_engine_t*, gl_eng, 0x00560600 );
176DefVar( WORD*, gl_gamma_ramp, 0x0055fdfc );
177DefVar( int, gl_gamma_ramp_valid, 0x005603fc );
178
179DefVar( char, opt_ignore_private_data,0x006370f0 );
180DefVar( char, opt_sound, 0x006370fc );
181
182DefVar( char, AKgDebug_DebugMaps, 0x002b2204 );
183
184DefVar( bool, BFgDebugFileEnable, 0x0055c8d0 );
185
186DefVar( uint32_t, COgConsoleLines, 0x005cb468 );
187DefVar( uint32_t, COgDefaultTextShade, 0x00533f70 );
188DefVar( uint32_t, COgDefaultTextShadow, 0x00533f74 );
189DefVar( uint32_t, COgFadeTimeValue, 0x00533f68 );
190
191DefVar( FILE*, ONgFileStartup, 0x005711b8 );
192DefVar( GameState*, ONgGameState, 0x005ece7c );
193DefVar( ONtPlatformData,ONgPlatformData, 0x0053100c );
194
195DefVar( char, M3gResolutionSwitch, 0x00531634 );
196
197DefVar( bool, SSgSearchOnDisk, 0x005eb758 );
198
199/*
200extern gl_engine_t* gl;
201extern gl_api_t* gl_api;
202extern WORD gl_gamma_ramp[3 * 256];
203extern int gl_gamma_ramp_valid;
204*/
205
206#undef DefVar
207void _DDrDefine_Symbols() {
208
209}
Note: See TracBrowser for help on using the repository browser.