Changeset 453 for Daodan/src
- Timestamp:
- Aug 10, 2009, 12:33:47 PM (15 years ago)
- Location:
- Daodan/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan_Cheater.c
r452 r453 2 2 3 3 #include "Oni.h" 4 #include "Oni_Character.h" 4 5 5 6 #include "Daodan.h" … … 7 8 8 9 oniCheatCode DDr_CheatTable[] = { 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 }, 14 { "glassworld", "Glass Furniture Enabled", "Glass Furniture Disabled", 0x05 }, 15 { "winlevel", "Instantly Win Level", NULL, 0x06 }, 16 { "loselevel", "Instantly Lose Level", NULL, 0x07 }, 17 { "bighead", "Big Head Enabled", "Big Head Disabled", 0x08 }, 18 { "minime", "Mini Mode Enabled", "Mini Mode Disabled", 0x09 }, 19 { "superammo", "Super Ammo Mode Enabled", "Super Ammo Mode Disabled", 0x0a }, 20 { "thedayismine", "Developer Access Enabled", "Developer Access Disabled", cheat_thedayismine }, 21 { "reservoirdogs", "Last Man Standing Enabled", "Last Man Standing Disabled", 0x0c }, 22 { "roughjustice", "Gatling Guns Enabled", "Gatling Guns Disabled", 0x0d }, 23 { "chenille", "Daodan Power Enabled", "Daodan Power Disabled", 0x0e }, 24 { "behemoth", "Godzilla Mode Enabled", "Godzilla Mode Disabled", 0x0f }, 25 { "elderrune", "Regeneration Enabled", "Regeneration Disabled", 0x10 }, 26 { "moonshadow", "Phase Cloak Enabled", "Phase Cloak Disabled", 0x11 }, 27 { "munitionfrenzy", "Weapons Locker Created", NULL, 0x12 }, 28 { "fistsoflegend", "Fists Of Legend Enabled", "Fists Of Legend Disabled", 0x13 }, 29 { "killmequick", "Ultra Mode Enabled", "Ultra Mode Disabled", 0x14 }, 30 { "carousel", "Slow Motion Enabled", "Slow Motion Disabled", 0x15 }, 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 }, 10 { "shapeshifter", "Change Characters Enabled", "Change Characters Disabled", cheat_shapeshifter }, 11 { "liveforever", "Invincibility Enabled", "Invincibility Disabled", cheat_liveforever }, 12 { "touchofdeath", "Omnipotence Enabled", "Omnipotence Disabled", cheat_touchofdeath }, 13 { "canttouchthis", "Unstoppable Enabled", "Unstoppable Disabled", cheat_canttouchthis }, 14 { "fatloot", "Fat Loot Received", NULL, cheat_fatloot }, 15 { "glassworld", "Glass Furniture Enabled", "Glass Furniture Disabled", cheat_glassworld }, 16 { "winlevel", "Instantly Win Level", NULL, cheat_winlevel }, 17 { "loselevel", "Instantly Lose Level", NULL, cheat_loselevel }, 18 { "bighead", "Big Head Enabled", "Big Head Disabled", cheat_bighead }, 19 { "minime", "Mini Mode Enabled", "Mini Mode Disabled", cheat_minime }, 20 { "superammo", "Super Ammo Mode Enabled", "Super Ammo Mode Disabled", cheat_superammo }, 21 { "thedayismine", "Developer Access Enabled", "Developer Access Disabled", cheat_thedayismine }, 22 { "reservoirdogs", "Last Man Standing Enabled", "Last Man Standing Disabled", cheat_reservoirdogs }, 23 { "roughjustice", "Gatling Guns Enabled", "Gatling Guns Disabled", cheat_roughjustice }, 24 { "chenille", "Daodan Power Enabled", "Daodan Power Disabled", cheat_chenille }, 25 { "behemoth", "Godzilla Mode Enabled", "Godzilla Mode Disabled", cheat_behemoth }, 26 { "elderrune", "Regeneration Enabled", "Regeneration Disabled", cheat_elderrune }, 27 { "moonshadow", "Phase Cloak Enabled", "Phase Cloak Disabled", cheat_moonshadow }, 28 { "munitionfrenzy", "Weapons Locker Created", NULL, cheat_munitionfrenzy }, 29 { "fistsoflegend", "Fists Of Legend Enabled", "Fists Of Legend Disabled", cheat_fistsoflegend }, 30 { "killmequick", "Ultra Mode Enabled", "Ultra Mode Disabled", cheat_killmequick }, 31 { "carousel", "Slow Motion Enabled", "Slow Motion Disabled", cheat_carousel }, 32 { "bigbadboss", "Boss Shield Enabled", "Boss Shield Disabled", cheat_bigbadboss }, 33 { "bulletproof", "Force Field Enabled", "Force Field Disabled", cheat_bulletproof }, 34 { "kangaroo", "Kangaroo Jump Enabled", "Kangaroo Jump Disabled", cheat_kangaroo }, 35 { "marypoppins", "Jet Pack Mode Enabled", "Jet Pack Mode Disabled", cheat_marypoppins }, 36 { "buddha", "Unkillable Enabled", "Unkillable Disabled", cheat_buddha }, 37 { "shinobi", "Ninja Mode Enabled (good luck!)", "Ninja Mode Disabled", cheat_shinobi }, 38 { "x", "Developer Access Enabled", "Developer Access Disabled", cheat_x }, 39 { "testcheat", "Testing...", "", cheat_testcheat }, 36 40 {0} 37 41 }; 42 43 // Just copied all these defines from the old daodan, they were originaly from SFeLi's code. 44 45 #define GSA_camera (0x00000080) 46 #define GSA_player (0x000000AC) 47 #define GSA_carousel (0x00000104) /* char */ 48 #define GSA_slowmotimer (0x00000108) 49 #define GSA_splashscreen (0x00000118) /* char */ 50 51 #define CHR_flags (0x00000004) 52 #define CHR_flags2 (0x00000008) 53 #define CHR_oncc (0x0000000C) 54 #define CHR_team (0x00000012) /* short */ 55 #define CHR_name (0x00000014) /* char[32] */ 56 #define CHR_scalemodel (0x00000034) 57 #define CHR_weapon1 (0x00000194) 58 #define CHR_weapon2 (0x00000198) 59 #define CHR_weapon3 (0x0000019C) 60 #define CHR_shield_curr (0x000001B6) /* short */ 61 #define CHR_shield (0x000001B8) /* short */ 62 #define CHR_phasecloak (0x000001BA) /* short */ 63 #define CHR_stats_kills (0x00001670) 64 #define CHR_stats_damage (0x00001674) 65 66 #define ONCC_jet_accel (0x00000010) /* float */ 67 #define ONCC_jet_timer (0x00000016) /* short */ 68 #define ONCC_height1 (0x00000018) /* float */ 69 #define ONCC_height2 (0x0000001C) /* float */ 70 #define ONCC_bodysize_min (0x00000C58) /* float */ 71 #define ONCC_bodysize_max (0x00000C8C) /* float */ 72 73 uint16_t cheat_oldshield = 0; 74 int32_t cheat_oldhealth = 0; 75 int32_t cheat_oldmaxhealth = 0; 38 76 39 77 uint8_t ONICALL DDrCheater(uint32_t cheat) … … 41 79 switch (cheat) 42 80 { 81 case cheat_bigbadboss: 82 { 83 char* player = *((char**)(ONgGameState + GSA_player)); 84 if (*(unsigned int*)(player + CHR_flags) & chr_bossshield) 85 { 86 *(unsigned int*)(player + CHR_flags) = *(unsigned int*)(player + CHR_flags) & ~chr_bossshield; 87 return 0; 88 } 89 else 90 { 91 *(unsigned int*)(player + CHR_flags) = *(unsigned int*)(player + CHR_flags) | chr_bossshield; 92 return 1; 93 } 94 } 95 case cheat_bulletproof: 96 { 97 char* player = *((char**)(ONgGameState + GSA_player)); 98 if (*(unsigned int*)(player + CHR_flags) & chr_weaponimmune) 99 { 100 *(unsigned int*)(player + CHR_flags) = *(unsigned int*)(player + CHR_flags) & ~chr_weaponimmune; 101 *(unsigned short*)(player + CHR_shield) = cheat_oldshield; 102 return 0; 103 } 104 else 105 { 106 *(unsigned int*)(player + CHR_flags) = *(unsigned int*)(player + CHR_flags) | chr_weaponimmune; 107 cheat_oldshield = *(unsigned short*)(player + CHR_shield); 108 *(unsigned short*)(player + CHR_shield) = 100; 109 return 1; 110 } 111 } 112 case cheat_buddha: 113 { 114 char* player = *((char**)(ONgGameState + GSA_player)); 115 if (*(unsigned int*)(player + CHR_flags) & chr_unkillable) 116 { 117 *(unsigned int*)(player + CHR_flags) = *(unsigned int*)(player + CHR_flags) & ~chr_unkillable; 118 return 0; 119 } 120 else 121 { 122 *(unsigned int*)(player + CHR_flags) = *(unsigned int*)(player + CHR_flags) | chr_unkillable; 123 return 1; 124 } 125 } 126 case cheat_shinobi: 127 { 128 Character* player = (Character*)*((char**)(ONgGameState + GSA_player)); 129 if (player->MaxHealth == 1) 130 { 131 player->Health = cheat_oldhealth; 132 player->MaxHealth = cheat_oldmaxhealth; 133 return 0; 134 } 135 else 136 { 137 cheat_oldhealth = player->Health; 138 cheat_oldmaxhealth = player->MaxHealth; 139 player->Health = 1; 140 player->MaxHealth = 1; 141 return 1; 142 } 143 144 } 145 case cheat_testcheat: 146 { 147 char* player = *((char**)(ONgGameState + GSA_player)); 148 *(unsigned int*)(player + CHR_flags) = *(unsigned int*)(player + CHR_flags) | chr_noncombatant; 149 return 1; 150 } 43 151 case cheat_x: 44 152 return ONrCheater(cheat_thedayismine); -
Daodan/src/Daodan_Cheater.h
r452 r453 38 38 cheat_kangaroo, 39 39 cheat_marypoppins, 40 cheat_buddha, 41 cheat_shinobi, 40 42 cheat_x, 43 cheat_testcheat, 41 44 }; 42 45 -
Daodan/src/Oni_Character.h
r446 r453 541 541 }; 542 542 543 typedef enum { 544 chr_isplayer = 1 << 0, 545 chr_randomskin = 1 << 1, 546 chr_notprespawned = 1 << 2, 547 chr_noncombatant = 1 << 3, 548 chr_multispawnable = 1 << 4, 549 chr_unkillable = 1 << 5, 550 chr_superammo = 1 << 6, 551 chr_omniscient = 1 << 8, 552 chr_haslsi = 1 << 9, 553 chr_boss = 1 << 10, 554 chr_upgradedifficulty = 1 << 11, 555 chr_noautodrop = 1 << 12, 556 chr_dontaim = 1 << 13, 557 chr_nocollision = 1 << 17, 558 chr_noshadow = 1 << 24, 559 chr_invincible = 1 << 25, 560 chr_bossshield = 1 << 30, 561 chr_weaponimmune = 1 << 31, 562 } chr_flags; 563 /* 543 564 enum { 544 565 chr_isplayer = 0x00000001, //is player character … … 556 577 chr_noautodrop = 0x00001000, //uses drop fields instead of has fields on death 557 578 }; // 579 */ 558 580 int16_t ONICALL ONrGameState_NewCharacter(CharacterObject* CHAR, void* AISA, void* flag, int* list_location); 559 581 int32_t* ONICALL ONrGetActiveCharacter(void* CharacterPtr);
Note:
See TracChangeset
for help on using the changeset viewer.