GB, GBA: Make file type checking functions public API

This commit is contained in:
Vicki Pfau 2019-06-30 11:33:47 -07:00
parent cbc27f08f9
commit 09cce3627b
5 changed files with 12 additions and 8 deletions

View File

@ -47,6 +47,11 @@ struct GBSIODriver {
uint8_t (*writeSC)(struct GBSIODriver* driver, uint8_t value);
};
struct VFile;
bool GBIsROM(struct VFile* vf);
bool GBIsBIOS(struct VFile* vf);
enum GBModel GBNameToModel(const char*);
const char* GBModelToName(enum GBModel);

View File

@ -38,6 +38,7 @@ struct GBA;
struct GBAAudio;
struct GBASIO;
struct GBAVideoRenderer;
struct VFile;
extern MGBA_EXPORT const int GBA_LUX_LEVELS[10];
@ -46,6 +47,10 @@ enum {
mPERIPH_GBA_BATTLECHIP_GATE,
};
bool GBAIsROM(struct VFile* vf);
bool GBAIsMB(struct VFile* vf);
bool GBAIsBIOS(struct VFile* vf);
struct GBALuminanceSource {
void (*sample)(struct GBALuminanceSource*);

View File

@ -163,7 +163,6 @@ bool GBLoadSave(struct GB* gb, struct VFile* vf);
void GBUnloadROM(struct GB* gb);
void GBSynthesizeROM(struct VFile* vf);
bool GBIsBIOS(struct VFile* vf);
void GBLoadBIOS(struct GB* gb, struct VFile* vf);
void GBSramClean(struct GB* gb, uint32_t frameCount);
@ -174,7 +173,6 @@ void GBSavedataUnmask(struct GB* gb);
struct Patch;
void GBApplyPatch(struct GB* gb, struct Patch* patch);
bool GBIsROM(struct VFile* vf);
void GBGetGameTitle(const struct GB* gba, char* out);
void GBGetGameCode(const struct GB* gba, char* out);

View File

@ -169,9 +169,6 @@ void GBAApplyPatch(struct GBA* gba, struct Patch* patch);
bool GBALoadMB(struct GBA* gba, struct VFile* vf);
bool GBALoadNull(struct GBA* gba);
bool GBAIsROM(struct VFile* vf);
bool GBAIsMB(struct VFile* vf);
bool GBAIsBIOS(struct VFile* vf);
void GBAGetGameCode(const struct GBA* gba, char* out);
void GBAGetGameTitle(const struct GBA* gba, char* out);

View File

@ -17,12 +17,11 @@
#ifdef M_CORE_GB
#include <mgba/gb/core.h>
// TODO: Fix layering violation
#include <mgba/internal/gb/gb.h>
#include <mgba/gb/interface.h>
#endif
#ifdef M_CORE_GBA
#include <mgba/gba/core.h>
#include <mgba/internal/gba/gba.h>
#include <mgba/gba/interface.h>
#endif
#ifndef MINIMAL_CORE
#include <mgba/feature/video-logger.h>