[Cheats] Split gateway and AR
This commit is contained in:
@@ -1,5 +1,26 @@
|
||||
#include "cheats.hpp"
|
||||
|
||||
ActionReplay::ActionReplay() { reset(); }
|
||||
Cheats::Cheats() { reset(); }
|
||||
|
||||
void ActionReplay::reset() { cheats.clear(); }
|
||||
void Cheats::reset() {
|
||||
cheats.clear(); // Unload loaded cheats
|
||||
ar.reset(); // Reset AR boi
|
||||
}
|
||||
|
||||
void Cheats::runCheats() {
|
||||
for (const Cheat& cheat : cheats) {
|
||||
switch (cheat.type) {
|
||||
case CheatType::ActionReplay: {
|
||||
ar.runCheat(cheat.instructions);
|
||||
break;
|
||||
}
|
||||
|
||||
case CheatType::Gateway: {
|
||||
Helpers::panic("Gateway cheats not supported yet! Only Action Replay is supported!");
|
||||
break;
|
||||
}
|
||||
|
||||
default: Helpers::panic("Unknown cheat type");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user