Make cheats struct more versatile
This commit is contained in:
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user