ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_Cheater.c
(Generate patch)

Comparing Daodan/src/Daodan_Cheater.c (file contents):
Revision 685 by alloc, Sun Mar 3 19:55:03 2013 UTC vs.
Revision 689 by alloc, Mon Mar 4 15:52:19 2013 UTC

# Line 14 | Line 14 | union MSVC_EVIL_FLOAT_HACK
14     float Value;
15   };
16   static union MSVC_EVIL_FLOAT_HACK INFINITY_HACK = {{0x00, 0x00, 0x80, 0x7F}};
17 < #define INFINITY (INFINITY_HACK.Value)
17 > #define DD_INFINITY (INFINITY_HACK.Value)
18  
19   oniCheatCode DDr_CheatTable[] = {
20          { "shapeshifter",     "Change Characters Enabled",       "Change Characters Disabled", cheat_shapeshifter     },
# Line 49 | Line 49 | oniCheatCode DDr_CheatTable[] = {
49          { "x",                "Developer Access Enabled",        "Developer Access Disabled",  cheat_x                },
50          { "testcheat",        "Testing...",                      "",                           cheat_testcheat        },
51          { "tellmetheversion", "Daodan v."DAODAN_VERSION_STRING"",                    "",                           cheat_tellmetheversion },
52 <        {0}
52 >        {0, 0, 0, 0}
53   };
54  
55  
# Line 149 | Line 149 | uint8_t ONICALL DDrCheater(uint32_t chea
149                                  player->ONCC->MaxFallingHeightWithDamage = cheat_oldheight2;
150                                  return 0;
151                          }
152 <                        else if (player->ONCC->JetpackTimer == 0xFFFF)
152 >                        else if ((unsigned short)player->ONCC->JetpackTimer == 0xFFFF)
153                          {
154                                  player->ONCC->JumpAcceleration = kangaroo_jp;
155                                  player->ONCC->JetpackTimer  = kangaroo_h;
156 <                                player->ONCC->MaxFallingHeightWithoutDamage = INFINITY;
157 <                                player->ONCC->MaxFallingHeightWithDamage  = INFINITY;
156 >                                player->ONCC->MaxFallingHeightWithoutDamage = DD_INFINITY;
157 >                                player->ONCC->MaxFallingHeightWithDamage  = DD_INFINITY;
158                                  return 1;
159                          }
160                          else
# Line 165 | Line 165 | uint8_t ONICALL DDrCheater(uint32_t chea
165                                  cheat_oldheight2 = player->ONCC->MaxFallingHeightWithDamage;
166                                  player->ONCC->JumpAcceleration = kangaroo_jp;
167                                  player->ONCC->JetpackTimer = kangaroo_h;
168 <                                player->ONCC->MaxFallingHeightWithoutDamage  = INFINITY;
169 <                                player->ONCC->MaxFallingHeightWithDamage  = INFINITY;
168 >                                player->ONCC->MaxFallingHeightWithoutDamage  = DD_INFINITY;
169 >                                player->ONCC->MaxFallingHeightWithDamage  = DD_INFINITY;
170                                  return 1;
171                          }
172                  }
# Line 176 | Line 176 | uint8_t ONICALL DDrCheater(uint32_t chea
176                          if (!inc_fallingframes)
177                          {
178                                  inc_fallingframes = true;
179 <                                if (player->ONCC->JetpackTimer == 0xFFFF)
179 >                                if ((unsigned short)player->ONCC->JetpackTimer == 0xFFFF)
180                                  {
181                                          player->ONCC->JumpAcceleration = cheat_oldjet_accel;
182                                          player->ONCC->JetpackTimer = cheat_oldjet_timer;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)