diff options
Diffstat (limited to 'src/core/memory')
| -rw-r--r-- | src/core/memory/cheat_engine.cpp | 14 | ||||
| -rw-r--r-- | src/core/memory/cheat_engine.h | 8 | ||||
| -rw-r--r-- | src/core/memory/dmnt_cheat_vm.cpp | 3 | ||||
| -rw-r--r-- | src/core/memory/dmnt_cheat_vm.h | 2 |
4 files changed, 14 insertions, 13 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index 0f5ef7954..46a7e09b4 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp | |||
| @@ -37,8 +37,8 @@ std::string_view ExtractName(std::string_view data, std::size_t start_index, cha | |||
| 37 | } | 37 | } |
| 38 | } // Anonymous namespace | 38 | } // Anonymous namespace |
| 39 | 39 | ||
| 40 | StandardVmCallbacks::StandardVmCallbacks(Core::System& system, const CheatProcessMetadata& metadata) | 40 | StandardVmCallbacks::StandardVmCallbacks(System& system_, const CheatProcessMetadata& metadata_) |
| 41 | : metadata(metadata), system(system) {} | 41 | : metadata{metadata_}, system{system_} {} |
| 42 | 42 | ||
| 43 | StandardVmCallbacks::~StandardVmCallbacks() = default; | 43 | StandardVmCallbacks::~StandardVmCallbacks() = default; |
| 44 | 44 | ||
| @@ -174,11 +174,11 @@ std::vector<CheatEntry> TextCheatParser::Parse(std::string_view data) const { | |||
| 174 | return out; | 174 | return out; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | CheatEngine::CheatEngine(Core::System& system, std::vector<CheatEntry> cheats, | 177 | CheatEngine::CheatEngine(System& system_, std::vector<CheatEntry> cheats_, |
| 178 | const std::array<u8, 0x20>& build_id) | 178 | const std::array<u8, 0x20>& build_id_) |
| 179 | : vm{std::make_unique<StandardVmCallbacks>(system, metadata)}, | 179 | : vm{std::make_unique<StandardVmCallbacks>(system_, metadata)}, |
| 180 | cheats(std::move(cheats)), core_timing{system.CoreTiming()}, system{system} { | 180 | cheats(std::move(cheats_)), core_timing{system_.CoreTiming()}, system{system_} { |
| 181 | metadata.main_nso_build_id = build_id; | 181 | metadata.main_nso_build_id = build_id_; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | CheatEngine::~CheatEngine() { | 184 | CheatEngine::~CheatEngine() { |
diff --git a/src/core/memory/cheat_engine.h b/src/core/memory/cheat_engine.h index 5e6f901ec..a8e041d9d 100644 --- a/src/core/memory/cheat_engine.h +++ b/src/core/memory/cheat_engine.h | |||
| @@ -25,7 +25,7 @@ namespace Core::Memory { | |||
| 25 | 25 | ||
| 26 | class StandardVmCallbacks : public DmntCheatVm::Callbacks { | 26 | class StandardVmCallbacks : public DmntCheatVm::Callbacks { |
| 27 | public: | 27 | public: |
| 28 | StandardVmCallbacks(Core::System& system, const CheatProcessMetadata& metadata); | 28 | StandardVmCallbacks(System& system_, const CheatProcessMetadata& metadata_); |
| 29 | ~StandardVmCallbacks() override; | 29 | ~StandardVmCallbacks() override; |
| 30 | 30 | ||
| 31 | void MemoryRead(VAddr address, void* data, u64 size) override; | 31 | void MemoryRead(VAddr address, void* data, u64 size) override; |
| @@ -38,7 +38,7 @@ private: | |||
| 38 | VAddr SanitizeAddress(VAddr address) const; | 38 | VAddr SanitizeAddress(VAddr address) const; |
| 39 | 39 | ||
| 40 | const CheatProcessMetadata& metadata; | 40 | const CheatProcessMetadata& metadata; |
| 41 | Core::System& system; | 41 | System& system; |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | // Intermediary class that parses a text file or other disk format for storing cheats into a | 44 | // Intermediary class that parses a text file or other disk format for storing cheats into a |
| @@ -61,8 +61,8 @@ public: | |||
| 61 | // Class that encapsulates a CheatList and manages its interaction with memory and CoreTiming | 61 | // Class that encapsulates a CheatList and manages its interaction with memory and CoreTiming |
| 62 | class CheatEngine final { | 62 | class CheatEngine final { |
| 63 | public: | 63 | public: |
| 64 | CheatEngine(Core::System& system_, std::vector<CheatEntry> cheats_, | 64 | CheatEngine(System& system_, std::vector<CheatEntry> cheats_, |
| 65 | const std::array<u8, 0x20>& build_id); | 65 | const std::array<u8, 0x20>& build_id_); |
| 66 | ~CheatEngine(); | 66 | ~CheatEngine(); |
| 67 | 67 | ||
| 68 | void Initialize(); | 68 | void Initialize(); |
diff --git a/src/core/memory/dmnt_cheat_vm.cpp b/src/core/memory/dmnt_cheat_vm.cpp index 48be80c12..dc04e37d2 100644 --- a/src/core/memory/dmnt_cheat_vm.cpp +++ b/src/core/memory/dmnt_cheat_vm.cpp | |||
| @@ -29,7 +29,8 @@ | |||
| 29 | 29 | ||
| 30 | namespace Core::Memory { | 30 | namespace Core::Memory { |
| 31 | 31 | ||
| 32 | DmntCheatVm::DmntCheatVm(std::unique_ptr<Callbacks> callbacks) : callbacks(std::move(callbacks)) {} | 32 | DmntCheatVm::DmntCheatVm(std::unique_ptr<Callbacks> callbacks_) |
| 33 | : callbacks(std::move(callbacks_)) {} | ||
| 33 | 34 | ||
| 34 | DmntCheatVm::~DmntCheatVm() = default; | 35 | DmntCheatVm::~DmntCheatVm() = default; |
| 35 | 36 | ||
diff --git a/src/core/memory/dmnt_cheat_vm.h b/src/core/memory/dmnt_cheat_vm.h index 21b86b72c..707bee82b 100644 --- a/src/core/memory/dmnt_cheat_vm.h +++ b/src/core/memory/dmnt_cheat_vm.h | |||
| @@ -293,7 +293,7 @@ public: | |||
| 293 | static constexpr std::size_t NumStaticRegisters = | 293 | static constexpr std::size_t NumStaticRegisters = |
| 294 | NumReadableStaticRegisters + NumWritableStaticRegisters; | 294 | NumReadableStaticRegisters + NumWritableStaticRegisters; |
| 295 | 295 | ||
| 296 | explicit DmntCheatVm(std::unique_ptr<Callbacks> callbacks); | 296 | explicit DmntCheatVm(std::unique_ptr<Callbacks> callbacks_); |
| 297 | ~DmntCheatVm(); | 297 | ~DmntCheatVm(); |
| 298 | 298 | ||
| 299 | std::size_t GetProgramSize() const { | 299 | std::size_t GetProgramSize() const { |