// 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" void __CheatInit(); void __CheatShutdown(); std::vector makeCodeParts(); 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(); int GetAddress(int value); static uint64_t const serialVersionUID = 6791588139795694296ULL; static const int cheatsThreadSleepMillis = 5; bool cheatsOn; std::vector codes; size_t currentCode; bool exit2; std::vector parts; };