Changeset 452
- Timestamp:
- Aug 10, 2009, 11:09:53 AM (15 years ago)
- Location:
- Daodan
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan.c
r451 r452 48 48 bool patch_daodaninit = true; 49 49 bool patch_bsl = true; 50 bool patch_cheater = true; 50 51 51 52 bool opt_usedaodanbsl = true; … … 244 245 else if (!stricmp(name, "bsl")) 245 246 patch_bsl = !stricmp(inifile_cleanstr(value), "true"); 247 else if (!stricmp(name, "cheater")) 248 patch_cheater = !stricmp(inifile_cleanstr(value), "true"); 246 249 else 247 250 DDrStartupMessage("unrecognised patch \"%s\"", name); … … 306 309 char* str = strdup(value); 307 310 DDr_CheatTable[11].message_on = str; 308 DDr_CheatTable[cheat_ devmodex].message_on = str;311 DDr_CheatTable[cheat_x].message_on = str; 309 312 } 310 313 else if (!stricmp(name, "devmode_off")) … … 312 315 char* str = strdup(value); 313 316 DDr_CheatTable[11].message_off = str; 314 DDr_CheatTable[cheat_ devmodex].message_off = str;317 DDr_CheatTable[cheat_x].message_off = str; 315 318 } 316 319 else if (!stricmp(name, "reservoirdogs_on")) … … 432 435 SLrDaodan_Patch(); 433 436 437 if (patch_cheater) 438 DDrPatch_MakeCall(OniExe + 0x000f618f, DDrCheater); 439 434 440 init_daodan_gl(); 435 441 -
Daodan/src/Daodan_Cheater.c
r388 r452 1 1 #include <string.h> 2 2 3 #include "Oni.h" 4 5 #include "Daodan.h" 3 6 #include "Daodan_Cheater.h" 4 7 5 8 oniCheatCode DDr_CheatTable[] = { 6 { "shapeshifter", "Change Characters Enabled", "Change Characters Disabled", 0x00},7 { "liveforever", "Invincibility Enabled", "Invincibility Disabled", 0x01},8 { "touchofdeath", "Omnipotence Enabled", "Omnipotence Disabled", 0x02},9 { "canttouchthis", "Unstoppable Enabled", "Unstoppable Disabled", 0x03},10 { "fatloot", "Fat Loot Received", NULL, 0x04},9 { "shapeshifter", "Change Characters Enabled", "Change Characters Disabled", cheat_shapeshifter }, 10 { "liveforever", "Invincibility Enabled", "Invincibility Disabled", cheat_liveforever }, 11 { "touchofdeath", "Omnipotence Enabled", "Omnipotence Disabled", cheat_touchofdeath }, 12 { "canttouchthis", "Unstoppable Enabled", "Unstoppable Disabled", cheat_canttouchthis }, 13 { "fatloot", "Fat Loot Received", NULL, cheat_fatloot }, 11 14 { "glassworld", "Glass Furniture Enabled", "Glass Furniture Disabled", 0x05 }, 12 15 { "winlevel", "Instantly Win Level", NULL, 0x06 }, … … 15 18 { "minime", "Mini Mode Enabled", "Mini Mode Disabled", 0x09 }, 16 19 { "superammo", "Super Ammo Mode Enabled", "Super Ammo Mode Disabled", 0x0a }, 17 { "thedayismine", "Developer Access Enabled", "Developer Access Disabled", 0x0b},20 { "thedayismine", "Developer Access Enabled", "Developer Access Disabled", cheat_thedayismine }, 18 21 { "reservoirdogs", "Last Man Standing Enabled", "Last Man Standing Disabled", 0x0c }, 19 22 { "roughjustice", "Gatling Guns Enabled", "Gatling Guns Disabled", 0x0d }, … … 26 29 { "killmequick", "Ultra Mode Enabled", "Ultra Mode Disabled", 0x14 }, 27 30 { "carousel", "Slow Motion Enabled", "Slow Motion Disabled", 0x15 }, 28 { "bigbadboss", "Boss Shield Enabled", "Boss Shield Disabled", cheat_bigbadboss },29 { "bulletproof", "Force Field Enabled", "Force Field Disabled", cheat_bulletproof },30 { "kangaroo", "Kangaroo Jump Enabled", "Kangaroo Jump Disabled", cheat_kangaroo },31 { "marypoppins", "Jet Pack Mode Enabled", "Jet Pack Mode Disabled", cheat_marypoppins },32 { "x", "Developer Access Enabled", "Developer Access Disabled", 0x0b},31 { "bigbadboss", "Boss Shield Enabled", "Boss Shield Disabled", cheat_bigbadboss }, 32 { "bulletproof", "Force Field Enabled", "Force Field Disabled", cheat_bulletproof }, 33 { "kangaroo", "Kangaroo Jump Enabled", "Kangaroo Jump Disabled", cheat_kangaroo }, 34 { "marypoppins", "Jet Pack Mode Enabled", "Jet Pack Mode Disabled", cheat_marypoppins }, 35 { "x", "Developer Access Enabled", "Developer Access Disabled", cheat_x }, 33 36 {0} 34 37 }; 38 39 uint8_t ONICALL DDrCheater(uint32_t cheat) 40 { 41 switch (cheat) 42 { 43 case cheat_x: 44 return ONrCheater(cheat_thedayismine); 45 default: 46 return ONrCheater(cheat); 47 } 48 } -
Daodan/src/Daodan_Cheater.h
r388 r452 2 2 #ifndef DAODAN_CHEATER_H 3 3 #define DAODAN_CHEATER_H 4 5 #include <stdint.h> 4 6 5 7 typedef struct { … … 36 38 cheat_kangaroo, 37 39 cheat_marypoppins, 38 cheat_ devmodex,40 cheat_x, 39 41 }; 40 42 41 43 extern oniCheatCode DDr_CheatTable[]; 42 44 45 uint8_t ONICALL DDrCheater(uint32_t cheat); 46 43 47 #endif -
Daodan/src/Oni.h
r437 r452 4 4 5 5 #include "Daodan.h" 6 7 #include <stdint.h> 8 #include <windows.h> 6 9 7 10 typedef struct … … 15 18 LRESULT CALLBACK ONrPlatform_WindowProc(HWND Window, UINT Message, WPARAM WParam, LPARAM LParam); 16 19 20 uint8_t ONICALL ONrCheater(uint32_t cheat); 21 17 22 extern HINSTANCE g_Instance; 18 23 extern ONtPlatformData ONgPlatformData; -
Daodan/src/Oni_Symbols.S
r444 r452 14 14 symbol ( @ONrPlatform_Initialize@4 , 0x0010f670 ) 15 15 symbol ( _ONrPlatform_WindowProc@16 , 0x0010f7a0 ) 16 symbol ( @ONrCheater@4 , 0x000f5c30 ) 16 17 17 18 symbol ( _g_Instance , 0x0021f9e4 ) … … 19 20 symbol ( _ONgGameState , 0x001ece7c ) 20 21 21 // Oni Persistance22 // Oni Persistance 22 23 symbol ( @ONrPersist_GetGamma@0 , 0x0010f450 ) 23 24 symbol ( @ONrPersist_GetWonGame@0 , 0x0010f660 )
Note:
See TracChangeset
for help on using the changeset viewer.