ppsspp/Core/CwCheat.h

42 lines
930 B
C
Raw Normal View History

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