diff options
author | Arisotura <thetotalworm@gmail.com> | 2023-11-04 17:28:16 +0100 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2023-11-04 17:28:16 +0100 |
commit | 8f1b0d4a052db068a029cd5784e52da7ecc9813e (patch) | |
tree | a979e06487722e247403a2cf2e19f46c7adc2c0c /src/AREngine.cpp | |
parent | 2bd09eafebbc98e2e2b9fbb023b31551ccd8cf12 (diff) |
convert AREngine
Diffstat (limited to 'src/AREngine.cpp')
-rw-r--r-- | src/AREngine.cpp | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/src/AREngine.cpp b/src/AREngine.cpp index ffed6b9..c8888ac 100644 --- a/src/AREngine.cpp +++ b/src/AREngine.cpp @@ -26,32 +26,17 @@ using Platform::Log; using Platform::LogLevel; -namespace AREngine -{ - -// AR code file - frontend is responsible for managing this -ARCodeFile* CodeFile; - -u8 (*BusRead8)(u32 addr); -u16 (*BusRead16)(u32 addr); -u32 (*BusRead32)(u32 addr); -void (*BusWrite8)(u32 addr, u8 val); -void (*BusWrite16)(u32 addr, u16 val); -void (*BusWrite32)(u32 addr, u32 val); - -bool Init() +AREngine::AREngine() { CodeFile = nullptr; - - return true; } -void DeInit() +AREngine::~AREngine() { } -void Reset() +void AREngine::Reset() { if (NDS::ConsoleType == 1) { @@ -74,16 +59,6 @@ void Reset() } -ARCodeFile* GetCodeFile() -{ - return CodeFile; -} - -void SetCodeFile(ARCodeFile* file) -{ - CodeFile = file; -} - #define case16(x) \ case ((x)+0x00): case ((x)+0x01): case ((x)+0x02): case ((x)+0x03): \ @@ -91,7 +66,7 @@ void SetCodeFile(ARCodeFile* file) case ((x)+0x08): case ((x)+0x09): case ((x)+0x0A): case ((x)+0x0B): \ case ((x)+0x0C): case ((x)+0x0D): case ((x)+0x0E): case ((x)+0x0F) -void RunCheat(ARCode& arcode) +void AREngine::RunCheat(ARCode& arcode) { u32* code = &arcode.Code[0]; @@ -437,7 +412,7 @@ void RunCheat(ARCode& arcode) } } -void RunCheats() +void AREngine::RunCheats() { if (!CodeFile) return; @@ -454,5 +429,3 @@ void RunCheats() } } } - -} |