Get our first AR code running

This commit is contained in:
wheremyfoodat 2023-07-20 13:50:32 +03:00
parent ae69c8f8c4
commit 97f8ea6cfd
6 changed files with 110 additions and 23 deletions

View file

@ -1,13 +1,15 @@
#include "cheats.hpp"
Cheats::Cheats() { reset(); }
Cheats::Cheats(Memory& mem) : ar(mem) { reset(); }
void Cheats::reset() {
cheats.clear(); // Unload loaded cheats
ar.reset(); // Reset AR boi
ar.reset(); // Reset ActionReplay
}
void Cheats::runCheats() {
void Cheats::addCheat(const Cheat& cheat) { cheats.push_back(cheat); }
void Cheats::run() {
for (const Cheat& cheat : cheats) {
switch (cheat.type) {
case CheatType::ActionReplay: {