Move NDSCart-related global state into objects (#1871)

* Move NDSCart-related global state into objects

- RAII will now do the heavy lifting
- Mark some methods as const or noexcept

* Move GBACart-related global state into objects (#1870)

- RAII will now do the heavy lifting
- Mark some methods as const or noexcept
- Once the `NDS` object is finalized, most of these `assert`s can go away

* Make AREngine::RunCheat public (#1872)

- I use it directly in melonDS DS to apply single cheats without using ARCodeFile
- Before the AREngine refactor I could just redeclare the function in my code
- Now I can't
This commit is contained in:
Jesse Talavera-Greenberg
2023-11-09 12:57:16 -05:00
committed by GitHub
parent 3d3e4240a0
commit 88072a02c5
7 changed files with 324 additions and 322 deletions

View File

@ -26,6 +26,7 @@
#include "Platform.h"
#include "Savestate.h"
#include "types.h"
#include "NDSCart.h"
#include "GBACart.h"
// when touching the main loop/timing code, pls test a lot of shit
@ -259,6 +260,7 @@ extern class SPU* SPU;
extern class SPIHost* SPI;
extern class RTC* RTC;
extern class Wifi* Wifi;
extern std::unique_ptr<NDSCart::NDSCartSlot> NDSCartSlot;
extern std::unique_ptr<GBACart::GBACartSlot> GBACartSlot;
extern class AREngine* AREngine;