2010-08-09 13:28:56 +00:00
|
|
|
struct CheatCode {
|
2011-09-15 12:41:49 +00:00
|
|
|
unsigned addr;
|
|
|
|
unsigned data;
|
2010-08-09 13:28:56 +00:00
|
|
|
};
|
|
|
|
|
2012-05-06 06:34:46 +00:00
|
|
|
struct Cheat : public vector<CheatCode> {
|
2013-05-05 09:21:30 +00:00
|
|
|
uint8* override;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
bool enabled() const;
|
|
|
|
void enable(bool);
|
|
|
|
void synchronize();
|
2011-01-18 10:17:48 +00:00
|
|
|
uint8 read(unsigned) const;
|
|
|
|
void init();
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
Cheat();
|
2011-01-18 10:17:48 +00:00
|
|
|
~Cheat();
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2013-05-05 09:21:30 +00:00
|
|
|
static bool decode(string, unsigned&, unsigned&);
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool system_enabled;
|
|
|
|
bool code_enabled;
|
|
|
|
bool cheat_enabled;
|
|
|
|
unsigned mirror(unsigned) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern Cheat cheat;
|