ppsspp/Core/CwCheat.h
Unknown W. Brackets 0c8cc25eb4 Always register the cheat event, for savestates.
This way, if you savestate with cheats on or off, it'll load fine.
2013-10-07 07:46:18 -07:00

42 lines
930 B
C++

// Rough and ready CwCheats implementation, disabled by default.
// Will not enable by default until the TOOD:s have been addressed.
#include <string>
#include <vector>
#include <iostream>
#include <sstream>
#include "base/basictypes.h"
#include "Core/MemMap.h"
class PointerWrap;
void __CheatInit();
void __CheatShutdown();
void __CheatDoState(PointerWrap &p);
std::vector<std::string> makeCodeParts(std::vector<std::string> CodesList);
class CWCheatEngine {
public:
CWCheatEngine();
std::string String();
void AddCheatLine(std::string& line);
std::vector<std::string> GetCodesList();
void CreateCodeList();
void Exit();
void Run();
std::vector<int> GetNextCode();
private:
void SkipCodes(int count);
void SkipAllCodes();
bool cheatsOn, exit2, cheatEnabled;
int GetAddress(int value);
std::vector<std::string> codeNameList;
std::vector<std::string> codes, initialCodesList, parts;
size_t currentCode;
};