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
This commit is contained in:
Jesse Talavera-Greenberg
2023-11-08 16:21:21 -05:00
committed by GitHub
parent b4ff911fa3
commit 8b47178add
5 changed files with 151 additions and 153 deletions

View File

@ -20,11 +20,13 @@
#define NDS_H
#include <string>
#include <memory>
#include <functional>
#include "Platform.h"
#include "Savestate.h"
#include "types.h"
#include "GBACart.h"
// when touching the main loop/timing code, pls test a lot of shit
// with this enabled, to make sure it doesn't desync
@ -257,7 +259,7 @@ extern class SPU* SPU;
extern class SPIHost* SPI;
extern class RTC* RTC;
extern class Wifi* Wifi;
extern std::unique_ptr<GBACart::GBACartSlot> GBACartSlot;
extern class AREngine* AREngine;
const u32 ARM7WRAMSize = 0x10000;