mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 01:06:50 +02:00
Further work on implementing support for cheats
This commit is contained in:
24
arm9/source/patches/arm7/cheats/CheatEnginePatchCode.h
Normal file
24
arm9/source/patches/arm7/cheats/CheatEnginePatchCode.h
Normal 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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user