mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Make cheats struct more versatile
This commit is contained in:
parent
d4a84c337e
commit
7e7d4f7f16
4 changed files with 82 additions and 5 deletions
|
@ -12,17 +12,22 @@ class Memory;
|
|||
class Cheats {
|
||||
public:
|
||||
enum class CheatType {
|
||||
None,
|
||||
ActionReplay, // CTRPF cheats
|
||||
// TODO: Other cheat devices and standards?
|
||||
};
|
||||
|
||||
struct Cheat {
|
||||
bool enabled;
|
||||
CheatType type;
|
||||
std::vector<u32> instructions;
|
||||
};
|
||||
|
||||
Cheats(Memory& mem, HIDService& hid);
|
||||
void addCheat(const Cheat& cheat);
|
||||
uint32_t addCheat(const Cheat& cheat);
|
||||
void removeCheat(uint32_t id);
|
||||
void enableCheat(uint32_t id);
|
||||
void disableCheat(uint32_t id);
|
||||
void reset();
|
||||
void run();
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ class Emulator {
|
|||
void deinitGraphicsContext() { gpu.deinitGraphicsContext(); }
|
||||
|
||||
EmulatorConfig& getConfig() { return config; }
|
||||
Cheats& getCheats() { return cheats; }
|
||||
ServiceManager& getServiceManager() { return kernel.getServiceManager(); }
|
||||
RendererType getRendererType() const { return config.rendererType; }
|
||||
Renderer* getRenderer() { return gpu.getRenderer(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue