From 7658321752585beb05668257628bc2ec3ddc17ef Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 26 Mar 2020 21:38:15 +0100 Subject: replaced age2hd cheat with a actually working one.. or at least worked Signed-off-by: Toni Uhlig --- aoe2hd/include/CodePatcher.h | 45 -------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100755 aoe2hd/include/CodePatcher.h (limited to 'aoe2hd/include/CodePatcher.h') diff --git a/aoe2hd/include/CodePatcher.h b/aoe2hd/include/CodePatcher.h deleted file mode 100755 index 1713b21..0000000 --- a/aoe2hd/include/CodePatcher.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef CODEPATCHER_H -#define CODEPATCHER_H - -#include -#include - -extern "C" { -#include "native.h" -} - - -typedef struct code_patch -{ - unsigned long addr; - std::vector old_code; - std::vector new_code; - long new_offset; - long suspend; -} code_patch; - -class CodePatcher -{ -public: - CodePatcher(const native_data& nd); - virtual ~CodePatcher(); - bool addPatch(const std::string& name, - unsigned long addr, - const std::vector& old_code, - const std::vector& new_code, - long new_offset = 0); - void setPatchSuspend(const std::string& name, long doSuspend); - bool doPatch(const std::string& name, int doUnPatch); - bool autoPatch(const std::string& name); - std::string toString(); -private: - const native_data& nd; - std::map patch_map; - bool codePatchExists(const std::string& name) - { - return patch_map.find(name) != patch_map.end(); - } - bool codeCmp(unsigned long addr, std::vector code); -}; - -#endif // CODEPATCHER_H -- cgit v1.2.3