mirror of https://github.com/mgba-emu/mgba.git
GB, GBA: Move more override-adjacent stuff to public API
This commit is contained in:
parent
318c5d7435
commit
a430f58c15
|
@ -82,6 +82,12 @@ struct GBCartridgeOverride {
|
|||
uint32_t gbColors[12];
|
||||
};
|
||||
|
||||
struct GBColorPreset {
|
||||
const char* name;
|
||||
uint32_t colors[12];
|
||||
};
|
||||
|
||||
struct Configuration;
|
||||
struct VFile;
|
||||
|
||||
bool GBIsROM(struct VFile* vf);
|
||||
|
@ -93,6 +99,12 @@ const char* GBModelToName(enum GBModel);
|
|||
|
||||
int GBValidModels(const uint8_t* bank0);
|
||||
|
||||
bool GBOverrideFind(const struct Configuration*, struct GBCartridgeOverride* override);
|
||||
bool GBOverrideColorFind(struct GBCartridgeOverride* override, enum GBColorLookup);
|
||||
void GBOverrideSave(struct Configuration*, const struct GBCartridgeOverride* override);
|
||||
|
||||
size_t GBColorPresetList(const struct GBColorPreset** presets);
|
||||
|
||||
CXX_GUARD_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -71,7 +71,7 @@ enum GBAHardwareDevice {
|
|||
HW_EREADER = 128
|
||||
};
|
||||
|
||||
struct GBA;
|
||||
struct Configuration;
|
||||
struct GBAAudio;
|
||||
struct GBASIO;
|
||||
struct GBAVideoRenderer;
|
||||
|
@ -84,9 +84,13 @@ enum {
|
|||
mPERIPH_GBA_BATTLECHIP_GATE,
|
||||
};
|
||||
|
||||
bool GBAIsROM(struct VFile* vf);
|
||||
bool GBAIsMB(struct VFile* vf);
|
||||
bool GBAIsBIOS(struct VFile* vf);
|
||||
struct GBACartridgeOverride {
|
||||
char id[4];
|
||||
enum GBASavedataType savetype;
|
||||
int hardware;
|
||||
uint32_t idleLoop;
|
||||
bool vbaBugCompat;
|
||||
};
|
||||
|
||||
struct GBALuminanceSource {
|
||||
void (*sample)(struct GBALuminanceSource*);
|
||||
|
@ -94,6 +98,13 @@ struct GBALuminanceSource {
|
|||
uint8_t (*readLuminance)(struct GBALuminanceSource*);
|
||||
};
|
||||
|
||||
bool GBAIsROM(struct VFile* vf);
|
||||
bool GBAIsMB(struct VFile* vf);
|
||||
bool GBAIsBIOS(struct VFile* vf);
|
||||
|
||||
bool GBAOverrideFind(const struct Configuration*, struct GBACartridgeOverride* override);
|
||||
void GBAOverrideSave(struct Configuration*, const struct GBACartridgeOverride* override);
|
||||
|
||||
struct GBASIODriver {
|
||||
struct GBASIO* p;
|
||||
|
||||
|
@ -104,14 +115,6 @@ struct GBASIODriver {
|
|||
uint16_t (*writeRegister)(struct GBASIODriver* driver, uint32_t address, uint16_t value);
|
||||
};
|
||||
|
||||
struct GBACartridgeOverride {
|
||||
char id[4];
|
||||
enum GBASavedataType savetype;
|
||||
int hardware;
|
||||
uint32_t idleLoop;
|
||||
bool vbaBugCompat;
|
||||
};
|
||||
|
||||
void GBASIOJOYCreate(struct GBASIODriver* sio);
|
||||
|
||||
enum GBASIOBattleChipGateFlavor {
|
||||
|
@ -132,6 +135,7 @@ struct GBASIOBattlechipGate {
|
|||
|
||||
void GBASIOBattlechipGateCreate(struct GBASIOBattlechipGate*);
|
||||
|
||||
struct GBA;
|
||||
void GBACartEReaderQueueCard(struct GBA* gba, const void* data, size_t size);
|
||||
|
||||
struct EReaderScan;
|
||||
|
|
|
@ -12,18 +12,6 @@ CXX_GUARD_START
|
|||
|
||||
#include <mgba/gb/interface.h>
|
||||
|
||||
struct GBColorPreset {
|
||||
const char* name;
|
||||
uint32_t colors[12];
|
||||
};
|
||||
|
||||
struct Configuration;
|
||||
bool GBOverrideFind(const struct Configuration*, struct GBCartridgeOverride* override);
|
||||
bool GBOverrideColorFind(struct GBCartridgeOverride* override, enum GBColorLookup);
|
||||
void GBOverrideSave(struct Configuration*, const struct GBCartridgeOverride* override);
|
||||
|
||||
size_t GBColorPresetList(const struct GBColorPreset** presets);
|
||||
|
||||
struct GB;
|
||||
void GBOverrideApply(struct GB*, const struct GBCartridgeOverride*);
|
||||
void GBOverrideApplyDefaults(struct GB*);
|
||||
|
|
|
@ -12,10 +12,6 @@ CXX_GUARD_START
|
|||
|
||||
#include <mgba/gba/interface.h>
|
||||
|
||||
struct Configuration;
|
||||
bool GBAOverrideFind(const struct Configuration*, struct GBACartridgeOverride* override);
|
||||
void GBAOverrideSave(struct Configuration*, const struct GBACartridgeOverride* override);
|
||||
|
||||
struct GBA;
|
||||
void GBAOverrideApply(struct GBA*, const struct GBACartridgeOverride*);
|
||||
void GBAOverrideApplyDefaults(struct GBA*, const struct Configuration*);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <mgba/internal/gba/gba.h>
|
||||
#ifdef M_CORE_GB
|
||||
#include <mgba/internal/gb/gb.h>
|
||||
#include <mgba/internal/gb/overrides.h>
|
||||
#include <mgba/gb/interface.h>
|
||||
#endif
|
||||
#include <mgba-util/gui/file-select.h>
|
||||
#include <mgba-util/gui/menu.h>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <mgba/feature/commandline.h>
|
||||
#ifdef M_CORE_GB
|
||||
#include <mgba/internal/gb/overrides.h>
|
||||
#include <mgba/gb/interface.h>
|
||||
#endif
|
||||
|
||||
static const mOption s_frontendOptions[] = {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "Override.h"
|
||||
|
||||
#include <mgba/internal/gba/overrides.h>
|
||||
#include <mgba/gba/interface.h>
|
||||
|
||||
namespace QGBA {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "Override.h"
|
||||
|
||||
#include <mgba/internal/gb/overrides.h>
|
||||
#include <mgba/gb/interface.h>
|
||||
|
||||
namespace QGBA {
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifdef M_CORE_GB
|
||||
#include "GameBoy.h"
|
||||
#include <mgba/internal/gb/overrides.h>
|
||||
#include <mgba/gb/interface.h>
|
||||
#endif
|
||||
|
||||
#include <mgba/core/serialize.h>
|
||||
|
|
Loading…
Reference in New Issue