Further work on implementing support for cheats

This commit is contained in:
Gericom
2026-02-21 19:30:03 +01:00
parent 3300c5277c
commit 83046e2cc2
11 changed files with 286 additions and 15 deletions

View File

@@ -0,0 +1,24 @@
#pragma once
#include "sections.h"
#include "patches/PatchCode.h"
DEFINE_SECTION_SYMBOLS(patch_cheatengine);
extern "C" void cheatengine_entry(void);
extern const void* cheatengine_cheatsPtr;
class CheatEnginePatchCode : public PatchCode
{
public:
CheatEnginePatchCode(PatchHeap& patchHeap, const void* cheatsAddress)
: PatchCode(SECTION_START(patch_cheatengine), SECTION_SIZE(patch_cheatengine), patchHeap)
{
cheatengine_cheatsPtr = cheatsAddress;
}
const void* GetCheatEngineFunction() const
{
return GetAddressAtTarget((void*)cheatengine_entry);
}
};