Changeset 574 for Daodan/MSVC
- Timestamp:
- Oct 11, 2010, 10:22:59 AM (14 years ago)
- Location:
- Daodan/MSVC
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/MSVC/Daodan.c
r573 r574 206 206 207 207 // Disable loading the vtuneapi.dll 208 if (patch_killvtune)209 DDrPatch_Byte (OniExe + 0x00026340, 0xC3);208 //if (patch_killvtune) 209 //DDrPatch_Byte (OniExe + 0x00026340, 0xC3); 210 210 211 211 // Disable Oni's internal CLrGetCommandLine function (to eventually replace it with our own) … … 235 235 DDrPatch_Const(0x0051BB64, regen_patch); 236 236 } 237 //Flatline related stuff 237 238 DDrPatch_MakeCall(0x004FBCEA, DDrText_Hook); 239 238 240 DDrPatch_Int32( 0x004B24D2, FLrSpawnHack); 241 239 242 DDrPatch_NOOP(0x004C26CB, 6); 240 243 DDrPatch_MakeCall( 0x004C26CB, FLrHook_DoorOpen); 241 244 DDrPatch_MakeCall( 0x004EE3CF, FLrHook_ConsoleActivate); 242 245 return true; 243 246 } -
Daodan/MSVC/Daodan_Utility.c
r573 r574 139 139 unsigned int lastPasteTime; 140 140 141 //TODO: Fix what happens when you hold down paste 142 //Check if console is open 141 143 void DDrPasteHack() 142 144 { … … 161 163 lastPasteTime = ONgGameState->GameTime; 162 164 } 165 CloseClipboard(); 163 166 } 167 164 168 } 165 169 else -
Daodan/MSVC/Flatline.h
r573 r574 191 191 EV_DISCONNECT, 192 192 EV_DOOR_OPEN, 193 EV_CONSOLE_USE, 193 194 EV_MAX, 194 195 }; -
Daodan/MSVC/Flatline_BSL.c
r573 r574 194 194 return 0; 195 195 } 196 197 196 uint16_t ONICALL con(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) 197 { 198 OBJrConsole_OnActivate( OBJrConsole_GetByID(args[0].value_int32), PlayerList[0]->Chr ); 199 return 0; 200 } 201 202 198 203 void SLrFlatline_Initialize() { 199 204 … … 209 214 SLrScript_Command_Register_ReturnType("addbot","adds a fake client", "", sl_void, addfake); 210 215 SLrScript_Command_Register_Void("kick", "Kicks a client from the server", "clientnum:int", kick); 216 SLrScript_Command_Register_Void("con", "Activates a console", "con:int", con); 211 217 //SLrScript_Command_Register_ReturnType("ai2_spawn","creates and starts an AI from a character object","ai_name:string [force_spawn:string{\"force\"} | ]", sl_void, spawnAI); 212 218 } -
Daodan/MSVC/Flatline_Server.c
r573 r574 121 121 } 122 122 123 //Always make sure you send a pointer to this, even if it is just one arg. ;) 123 124 void FLsPublic_Event( unsigned int eventIndex, int * args ) 124 125 { -
Daodan/MSVC/Oni_GameState.h
r573 r574 387 387 DoorOSD Door; //incomplete 388 388 } DoorObject; 389 390 389 391 390 typedef struct { … … 1287 1286 int field_221C; 1288 1287 char gap_2220[8]; 1289 int field_2228;1288 Matrix4x3 * ExtraBody; 1290 1289 char gap_222c[76]; 1291 1290 Matrix4x3 BoneMatrices[19]; -
Daodan/MSVC/Oni_Symbols.c
r573 r574 132 132 DefFunc( COrMessage_Print , 0x004304B0 ); 133 133 DefFunc( COrTextArea_Print , 0x00431340 ); 134 DefFunc( COrConsole_StatusLine_Display , 0x00431E70 );134 //DefFunc( COrConsole_StatusLine_Display , 0x00431E70 ); 135 135 136 136 DefFunc( OBJrObjectType_EnumerateObjects , 0x004D0080 ); 137 137 //DefFunc( OBJiObjectGroup_GetNumObjects , 138 138 139 DefFunc( ONiGameState_FindAutoPromptMessage , 0x004FDBE0 );139 //DefFunc( ONiGameState_FindAutoPromptMessage , 0x004FDBE0 ); 140 140 DefFunc( ONiMain , 0x004d3280 ); 141 141 … … 181 181 DefFunc( OBJrDoor_Open , 0x004C26C0 ); 182 182 DefFunc( OBJrDoor_ForceOpen , 0x004C1EE0 ); 183 184 #define DefVar(type, name, address) type* _##name = (type*)address 183 //DefFunc( OBJrConsole_GetByID , 0x004C0950 ); 184 DefFunc( OBJrConsole_OnActivate , 0x004C0880 ); 185 186 #define DefVar(type, name, address) //type* _##name = (type*)address 185 187 186 188 DefVar( onibool, ai2_deaf, 0x005ec0c1 ); -
Daodan/MSVC/Oni_Symbols.h
r573 r574 6 6 #include "Oni_Character.h" 7 7 #include "BFW_ScriptLang.h" 8 #define DefVar(type, name, address) extern type* _##name8 #define DefVar(type, name, address) static type* _##name = (type*)address 9 9 //variables 10 10 11 ///BADBAD DONT DO THIS12 extern onibool* _ai2_deaf;13 extern char* _AKgDebug_DebugMaps;14 extern HINSTANCE* _g_Instance;15 extern ONtPlatformData* _ONgPlatformData;16 extern char* _opt_ignore_private_data;17 extern char* _opt_sound;18 19 11 //DO THIS INSTEAD! 20 DefVar( GameState* , ONgGameState , 0x005ece7c);21 22 DefVar( bool, BFgDebugFileEnable, 0x0055c8d0);23 DefVar( bool, SSgSearchOnDisk, 0x005eb758); 24 DefVar( char, M3gResolutionSwitch, 0x00531634);12 DefVar( onibool, ai2_deaf, 0x005ec0c1 ); 13 14 DefVar( HINSTANCE, g_Instance, 0x0061F9E4 ); 15 16 DefVar( gl_api_t*, gl_api, 0x00560604 ); 25 17 DefVar( gl_engine_t*, gl_eng, 0x00560600 ); 26 DefVar( gl_api_t*, gl_api, 0x00560604 );27 18 DefVar( WORD*, gl_gamma_ramp, 0x0055fdfc ); 28 19 DefVar( int, gl_gamma_ramp_valid, 0x005603fc ); 29 DefVar( uint32_t, COgConsoleLines , 0x005cb468 ); 30 DefVar( uint32_t, COgFadeTimeValue , 0x00533f68 ); 31 DefVar( uint32_t, COgDefaultTextShade , 0x00533f70 ); 32 DefVar( uint32_t, COgDefaultTextShadow , 0x00533f74 ); 33 DefVar( FILE*, ONgFileStartup , 0x005711b8 ); 34 20 21 DefVar( char, opt_ignore_private_data,0x006370f0 ); 22 DefVar( char, opt_sound, 0x006370fc ); 23 24 DefVar( char, AKgDebug_DebugMaps, 0x002b2204 ); 25 26 DefVar( bool, BFgDebugFileEnable, 0x0055c8d0 ); 27 28 DefVar( uint32_t, COgConsoleLines, 0x005cb468 ); 29 DefVar( uint32_t, COgDefaultTextShade, 0x00533f70 ); 30 DefVar( uint32_t, COgDefaultTextShadow, 0x00533f74 ); 31 DefVar( uint32_t, COgFadeTimeValue, 0x00533f68 ); 32 33 DefVar( FILE*, ONgFileStartup, 0x005711b8 ); 34 DefVar( GameState*, ONgGameState, 0x005ece7c ); 35 DefVar( ONtPlatformData,ONgPlatformData, 0x0053100c ); 36 37 DefVar( char, M3gResolutionSwitch, 0x00531634 ); 38 39 DefVar( bool, SSgSearchOnDisk, 0x005eb758 ); 35 40 #undef DefVar 36 41 //Yes, I'm aware that there are a few ways this could go wrong … … 98 103 typedef int ( __cdecl *_AUrMessageBox)(int Buttons, char *Message, ...); 99 104 typedef char* ( *_SSrMessage_Find)(char* message_key); //Returns a prompt message from a message key 100 typedef void ( *_ONiGameState_FindAutoPromptMessage)(char* Note, void* ptr);105 //typedef void ( *_ONiGameState_FindAutoPromptMessage)(char* Note, void* ptr); 101 106 102 107 typedef uint16_t (ONICALL *sl_func)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret); … … 108 113 109 114 typedef int ( *_COrMessage_Print)(char* Message, char* Key, void* noidea); 110 typedef void ( *_COrConsole_StatusLine_Display)();115 //typedef void ( *_COrConsole_StatusLine_Display)(); 111 116 typedef int16_t ( *_TMrInstance_GetDataPtr)(int tag, char* name, void* pointer); 112 117 typedef char* ( *_TMrInstance_GetInstanceName)(void* InstancePointer); … … 148 153 typedef void ( *_OBJrDoor_Open)( DoorObject *inObject, Character *inCharacter ); 149 154 typedef void ( *_OBJrDoor_ForceOpen)(short id); 150 155 typedef short ( *_OBJrConsole_OnActivate)( void *inObject, Character *inCharacter ); 156 //typedef void* ( *_OBJrConsole_GetByID)( short ID ); 151 157 #define ExtFunc(name) extern _##name name 152 158 ExtFunc(SLrScript_Command_Register_ReturnType); … … 155 161 ExtFunc(SLrGlobalVariable_Register_Float); 156 162 ExtFunc(SLrGlobalVariable_Register_String); 157 ExtFunc(COrConsole_StatusLine_Display);163 //ExtFunc(COrConsole_StatusLine_Display); 158 164 ExtFunc(OBJrObjectType_EnumerateObjects); 159 165 //ExtFunc(OBJiObjectGroup_GetNumObjects); 166 //ExtFunc(OBJrConsole_GetByID); 160 167 ExtFunc(AI2iScript_Spawn); 161 168 … … 204 211 205 212 ExtFunc(SSrMessage_Find); 206 ExtFunc(ONiGameState_FindAutoPromptMessage);213 //ExtFunc(ONiGameState_FindAutoPromptMessage); 207 214 208 215 ExtFunc(TSrContext_DrawText); … … 211 218 ExtFunc(OBJrDoor_Open); 212 219 ExtFunc(OBJrDoor_ForceOpen); 220 221 ExtFunc(OBJrConsole_OnActivate); 222 //static const void* ( *OBJrConsole_GetByID)( short ID ) = (const void*(*)(short))0x004C0950; 223 #undef DefFunc 224 #define DefFunc( type, name, args, address) static const type ( * name ) args = (const type (*) args )address; 225 DefFunc( void*, OBJrConsole_GetByID, (short ID), 0x004C0950); 226 DefFunc( void, COrConsole_StatusLine_Display, (), 0x00431E70 ); 227 //typedef void ( *_ONiGameState_FindAutoPromptMessage)(char* Note, void* ptr); 228 DefFunc( void, ONiGameState_FindAutoPromptMessage, (char* Note, void* ptr), 0x004FDBE0 ); 213 229 #endif
Note:
See TracChangeset
for help on using the changeset viewer.