MCPcopy Create free account
hub / github.com/Stewmath/GameYob / toggleCheat

Function toggleCheat

arm9/source/cheats.cpp:86–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void toggleCheat (int i, bool enabled)
87{
88 if (enabled) {
89 cheats[i].flags |= FLAG_ENABLED;
90 if ((cheats[i].flags & FLAG_TYPE_MASK) != FLAG_GAMESHARK) {
91 for (int j=0; j<numRomBanks; j++) {
92 if (isRomBankLoaded(j))
93 applyGGCheatsToBank(j);
94 }
95 }
96 }
97 else {
98 unapplyGGCheat(i);
99 cheats[i].flags &= ~FLAG_ENABLED;
100 }
101}
102
103void unapplyGGCheat(int cheat) {
104 if ((cheats[cheat].flags & FLAG_TYPE_MASK) != FLAG_GAMESHARK) {

Callers 2

loadCheatsFunction · 0.85
updateCheatMenuFunction · 0.85

Calls 3

isRomBankLoadedFunction · 0.85
applyGGCheatsToBankFunction · 0.85
unapplyGGCheatFunction · 0.85

Tested by

no test coverage detected