Remove Cheats/ExtraCheats distinction

It is not necessary as there is no longer a need to preserve
the size/order of struct Cheats
This commit is contained in:
Jonathan G Rennison
2023-11-26 11:32:26 +00:00
parent 7d65fbd6e8
commit a3371fccc6
8 changed files with 20 additions and 38 deletions

View File

@@ -17,7 +17,6 @@
/** All the cheats. */
Cheats _cheats;
ExtraCheats _extra_cheats;
std::map<std::string, Cheat> _unknown_cheats;
@@ -25,7 +24,6 @@ std::map<std::string, Cheat> _unknown_cheats;
void InitializeCheats()
{
memset(&_cheats, 0, sizeof(Cheats));
memset(&_extra_cheats, 0, sizeof(ExtraCheats));
_unknown_cheats.clear();
}
@@ -43,12 +41,5 @@ bool CheatHasBeenUsed()
if (cht->been_used) return true;
}
cht = (Cheat*)&_extra_cheats;
cht_last = &cht[sizeof(_extra_cheats) / sizeof(Cheat)];
for (; cht != cht_last; cht++) {
if (cht->been_used) return true;
}
return false;
}