2013-05-16 15:42:25 -05:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <iostream>
|
|
|
|
#include <sstream>
|
|
|
|
#include "Core\MemMap.h"
|
|
|
|
|
2013-05-17 23:49:44 -05:00
|
|
|
void __CheatInit();
|
|
|
|
void __CheatShutdown();
|
|
|
|
//void Register_CwCheat();
|
2013-05-16 15:42:25 -05:00
|
|
|
using namespace std;
|
2013-05-17 23:49:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-16 15:42:25 -05:00
|
|
|
vector<string> makeCodeParts(string l);
|
|
|
|
void trim2(string& str);
|
|
|
|
|
|
|
|
|
2013-05-18 17:04:01 -05:00
|
|
|
class CWCheatEngine {
|
2013-05-16 15:42:25 -05:00
|
|
|
private:
|
|
|
|
static long const serialVersionUID = 6791588139795694296L;
|
|
|
|
static long const int cheatsThreadSleepMillis = 5;
|
|
|
|
bool cheatsOn;
|
2013-05-17 23:49:44 -05:00
|
|
|
std::vector<std::string> codes;
|
|
|
|
int currentCode;
|
|
|
|
bool exit2;
|
|
|
|
void skipCodes(int count);
|
|
|
|
void skipAllCodes();
|
|
|
|
int getAddress(int value);
|
|
|
|
|
2013-05-16 15:42:25 -05:00
|
|
|
public:
|
2013-05-18 17:04:01 -05:00
|
|
|
CWCheatEngine();
|
2013-05-16 15:42:25 -05:00
|
|
|
string String();
|
2013-05-17 23:49:44 -05:00
|
|
|
void AddCheatLine(string& line);
|
|
|
|
vector<string> GetCodesList();
|
|
|
|
|
|
|
|
void Exit();
|
|
|
|
void Run();
|
|
|
|
string GetNextCode();
|
2013-05-16 15:42:25 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|