Changeset 1017 for Daodan/src/Patches
- Timestamp:
- Mar 24, 2015, 12:29:19 AM (10 years ago)
- Location:
- Daodan/src/Patches
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Patches/Cheater.c
r1000 r1017 10 10 #include "../Daodan_Config.h" 11 11 #include "Cheater.h" 12 #include "Input.h" 13 #include "Utility.h" 12 14 13 15 union MSVC_EVIL_FLOAT_HACK … … 293 295 ++*((unsigned int*)((char*)Ebp + 0xf6)); 294 296 } 295 297 298 299 static void BindableCheatCallback (CustomActionCallbackArgument cheatnum) { 300 uint8_t res = DDrCheater (cheatnum); 301 if (res) 302 COrMessage_Print(DDr_CheatTable[cheatnum].message_on, 0, 240); 303 else 304 COrMessage_Print(DDr_CheatTable[cheatnum].message_off, 0, 240); 305 } 306 307 void InitBindableCheats() { 308 oniCheatCode* cur; 309 for (cur = DDr_CheatTable; cur->name != 0; cur++) { 310 // char* val = malloc(20); 311 // sprintf(val, "cheat_%s", cur->name); 312 Input_RegisterCustomAction (cur->name, EVENT_KEYPRESS, 0, BindableCheatCallback, cur->func); 313 } 314 } 315 -
Daodan/src/Patches/Cheater.h
r994 r1017 49 49 void __stdcall FallingFrames(void* Ebp); 50 50 void ONICALL DDrCheater_LevelLoad(); 51 void InitBindableCheats(); 51 52 52 53 #endif -
Daodan/src/Patches/Patches.c
r1008 r1017 6 6 #include "../Daodan_Config.h" 7 7 #include "GL.h" 8 #include "Input.h" 8 9 #include "../Daodan_Patch.h" 9 10 #include "Utility.h" … … 131 132 return Oni_COrTextArea_Resize(inTextArea, inBounds, inNumTextEntries); 132 133 } 134 135 133 136 134 137 #define IMcShade_Red (0xFFFF0000) … … 372 375 // At end of ONrUnlockLevel to init values on level loading 373 376 DDrPatch_MakeJump((void*)(OniExe + 0x0010f021), (void*)DDrCheater_LevelLoad); 377 378 if (DDrConfig_GetOptOfType("gameplay.bindablecheats", C_BOOL)->value.intBoolVal) 379 { 380 InitBindableCheats(); 381 } 374 382 } 375 383 … … 437 445 { 438 446 Oni_COrTextArea_Resize = DDrPatch_MakeDetour((void*)COrTextArea_Resize, (void*)DD_COrTextArea_Resize); 447 } 448 449 // Allow custom actions to be bound through Daodan 450 if (DDrConfig_GetOptOfType("gameplay.customactions", C_BOOL)->value.intBoolVal) 451 { 452 Input_PatchCode (); 439 453 } 440 454
Note:
See TracChangeset
for help on using the changeset viewer.