mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-07 03:21:38 +12:00
[Cheats] Add boilerplate
This commit is contained in:
parent
5b4f6ef46c
commit
0904638df0
5 changed files with 42 additions and 2 deletions
24
include/cheats.hpp
Normal file
24
include/cheats.hpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
#include "helpers.hpp"
|
||||
|
||||
class ActionReplay {
|
||||
using Cheat = std::vector<u32>; // A cheat is really just a bunch of u32 opcodes
|
||||
std::vector<Cheat> cheats;
|
||||
|
||||
u32 offset1, offset2; // Memory offset registers. Non-persistent.
|
||||
u32 data1, data2; // Data offset registers. Non-persistent.
|
||||
u32 storage1, storage2; // Storage registers. Persistent.
|
||||
|
||||
// When an instruction does not specify which offset or data register to use, we use the "active" one
|
||||
// Which is by default #1 and may be changed by certain AR operations
|
||||
u32 *activeOffset, *activeData;
|
||||
|
||||
public:
|
||||
ActionReplay();
|
||||
void addCheat(const Cheat& cheat);
|
||||
void runCheats();
|
||||
void reset();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue