Changeset 1017 for Daodan/src
- Timestamp:
- Mar 24, 2015, 12:29:19 AM (10 years ago)
- Location:
- Daodan/src
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan.h
r992 r1017 8 8 #include "Oni/Oni.h" 9 9 10 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) 11 10 12 extern HMODULE DDrDLLModule; 11 13 extern HMODULE DDrONiModule; -
Daodan/src/Daodan_Config.c
r1008 r1017 3 3 #include <time.h> 4 4 5 #include "Daodan.h" 5 6 #include "Daodan_Config.h" 6 7 #include "Daodan_Patch.h" … … 11 12 12 13 #include "Inifile_Reader.h" 13 14 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))15 14 16 15 static const char* iniName = "daodan.ini"; … … 48 47 } }, 49 48 { "gameplay", "Gameplay", { 49 { "bindablecheats", 50 "Allows cheats to be bound to keys. Requires 'customactions' and 'cheattable' to be true.", 51 C_BOOL, 52 {.intBoolVal = true}, 53 {.intBoolVal = true} }, 50 54 { "characterawareness", 51 55 "Makes AI remember the player.", … … 65 69 { "cooldowntimer", 66 70 "Disables weapon cooldown exploit.", 71 C_BOOL, 72 {.intBoolVal = true}, 73 {.intBoolVal = true} }, 74 { "customactions", 75 "Allows more actions to be bound through Daodan.", 67 76 C_BOOL, 68 77 {.intBoolVal = true}, -
Daodan/src/Oni/Oni.h
r992 r1017 34 34 } UUtRect; 35 35 36 typedef struct { 37 uint32_t input; 38 float analog; 39 } LItDeviceInput; 40 36 41 #include "Symbols_Var.h" 37 42 #include "Symbols_Func.h" -
Daodan/src/Oni/Symbols_Func.h
r995 r1017 101 101 102 102 // Print message to console ? 103 DefFunc(int, COrMessage_Print, ONICALL, (c har* Message, char* Key, void* noidea), 0x004304B0);103 DefFunc(int, COrMessage_Print, ONICALL, (const char* Message, const char* Key, uint32_t fadeTime), 0x004304B0); 104 104 DefFunc(UUtBool, COrCommand_Execute, ONICALL, (char* command), 0x004317D0); 105 105 … … 171 171 DefFunc(void, LIrPlatform_Terminate, ONICALL, (void), 0x00403620); 172 172 173 // Key_config callback for each mapping found 174 DefFunc(uint16_t, LIrBinding_Add, ONICALL, (uint32_t key, const char* name), 0x00403c60); 175 176 // Called when processing key input 177 DefFunc(void, LIrActionBuffer_Add, ONICALL, (void* unknown, LItDeviceInput* input), 0x00403b30); 178 179 173 180 #undef DefFunc 174 181 -
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 -
Daodan/src/_Version.h
r1008 r1017 5 5 #define STRINGIZE(s) STRINGIZE2(s) 6 6 7 #define DAODAN_VERSION_MAJOR 38 #define DAODAN_VERSION_MINOR 97 #define DAODAN_VERSION_MAJOR 4 8 #define DAODAN_VERSION_MINOR 0 9 9 #define DAODAN_VERSION_STRING STRINGIZE(DAODAN_VERSION_MAJOR) "." STRINGIZE(DAODAN_VERSION_MINOR) 10 10
Note:
See TracChangeset
for help on using the changeset viewer.