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