All: Add C++ header guards

This commit is contained in:
Jeffrey Pfau 2016-12-26 21:01:55 -08:00
parent daaa2fa523
commit 2f1cb61d01
187 changed files with 551 additions and 134 deletions

View File

@ -69,6 +69,7 @@ Misc:
- GB Memory: Reset ROM bank when loading a ROM
- GBA DMA: Refactor DMA out of memory.c
- GBA DMA: Move DMAs to using absolute timing
- All: Add C++ header guards
0.5.1: (2016-10-05)
Bugfixes:

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/cpu.h"
enum {
@ -175,4 +177,6 @@ void ARMRun(struct ARMCore* cpu);
void ARMRunLoop(struct ARMCore* cpu);
void ARMRunFake(struct ARMCore* cpu, uint32_t opcode);
CXX_GUARD_END
#endif

View File

@ -8,7 +8,11 @@
#include "util/common.h"
CXX_GUARD_START
struct CLIDebuggerSystem;
void ARMCLIDebuggerCreate(struct CLIDebuggerSystem* debugger);
CXX_GUARD_END
#endif

View File

@ -3,6 +3,13 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ARM_DEBUGGER_H
#define ARM_DEBUGGER_H
#include "util/common.h"
CXX_GUARD_START
#include "debugger/debugger.h"
struct ARMDebugBreakpoint {
@ -40,3 +47,7 @@ struct ARMDebugger {
struct mDebuggerPlatform* ARMDebuggerPlatformCreate(void);
bool ARMDebuggerSetSoftwareBreakpoint(struct mDebuggerPlatform* debugger, uint32_t address, enum ExecutionMode mode);
void ARMDebuggerClearSoftwareBreakpoint(struct mDebuggerPlatform* debugger, uint32_t address);
CXX_GUARD_END
#endif

View File

@ -8,9 +8,13 @@
#include "util/common.h"
CXX_GUARD_START
struct ARMDebugger;
void ARMDebuggerInstallMemoryShim(struct ARMDebugger* debugger);
void ARMDebuggerRemoveMemoryShim(struct ARMDebugger* debugger);
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef ARM_DECODER_H
#define ARM_DECODER_H
#include "util/common.h"
CXX_GUARD_START
#include "arm.h"
// Bit 0: a register is involved with this operand
@ -214,4 +218,6 @@ bool ARMDecodeThumbCombine(struct ARMInstructionInfo* info1, struct ARMInstructi
struct ARMInstructionInfo* out);
int ARMDisassemble(struct ARMInstructionInfo* info, uint32_t pc, char* buffer, int blen);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#define ARM_PREFETCH_CYCLES (1 + cpu->memory.activeSeqCycles32)
struct ARMCore;
@ -15,4 +17,6 @@ struct ARMCore;
typedef void (*ARMInstruction)(struct ARMCore*, uint32_t opcode);
extern const ARMInstruction _armTable[0x1000];
CXX_GUARD_END
#endif

View File

@ -8,9 +8,13 @@
#include "util/common.h"
CXX_GUARD_START
struct ARMCore;
typedef void (*ThumbInstruction)(struct ARMCore*, uint16_t opcode);
extern const ThumbInstruction _thumbTable[0x400];
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/cpu.h"
#include "core/log.h"
#include "util/vector.h"
@ -100,4 +102,6 @@ bool mCheatSaveFile(struct mCheatDevice*, struct VFile*);
void mCheatRefresh(struct mCheatDevice*, struct mCheatSet*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "util/configuration.h"
struct mCoreConfig {
@ -91,4 +93,6 @@ const struct Configuration* mCoreConfigGetOverridesConst(const struct mCoreConfi
void mCoreConfigFreeOpts(struct mCoreOptions* opts);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/config.h"
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
#include "core/directories.h"
@ -159,4 +161,6 @@ void mCoreInitConfig(struct mCore* core, const char* port);
void mCoreLoadConfig(struct mCore* core);
void mCoreLoadForeignConfig(struct mCore* core, const struct mCoreConfig* config);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
enum mCPUComponentType {
CPU_COMPONENT_DEBUGGER,
CPU_COMPONENT_CHEAT_DEVICE,
@ -20,4 +22,6 @@ struct mCPUComponent {
void (*deinit)(struct mCPUComponent* component);
};
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
struct VDir;
@ -34,4 +36,6 @@ struct mCoreOptions;
void mDirectorySetMapOptions(struct mDirectorySet* dirs, const struct mCoreOptions* opts);
#endif
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
struct Configuration;
struct mInputPlatformInfo {
@ -60,4 +62,6 @@ const char* mInputGetCustomValue(const struct Configuration* config, const char*
void mInputSetCustomValue(struct Configuration* config, const char* platformName, uint32_t type, const char* key, const char* value,
const char* profile);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
struct mCore;
#ifdef COLOR_16_BIT
@ -84,4 +86,6 @@ struct mRumble {
void (*setRumble)(struct mRumble*, int enable);
};
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/core.h"
#include "util/vector.h"
@ -34,4 +36,6 @@ struct VFile;
void mLibraryLoadDirectory(struct mLibrary* library, struct VDir* dir);
void mLibraryAddEntry(struct mLibrary* library, const char* filename, struct VFile* vf);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
enum mLockstepPhase {
TRANSFER_IDLE = 0,
TRANSFER_STARTING,
@ -34,4 +36,6 @@ struct mLockstep {
void mLockstepInit(struct mLockstep*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
enum mLogLevel {
mLOG_FATAL = 0x01,
mLOG_ERROR = 0x02,
@ -58,4 +60,6 @@ static inline void mLog(int category, enum mLogLevel level, const char* format,
mLOG_DECLARE_CATEGORY(STATUS)
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "util/vector.h"
DECLARE_VECTOR(mCoreRewindPatches, struct PatchFast);
@ -28,4 +30,6 @@ struct mCore;
void mCoreRewindAppend(struct mCoreRewindContext*, struct mCore*);
bool mCoreRewindRestore(struct mCoreRewindContext*, struct mCore*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
enum mStateExtdataTag {
EXTDATA_NONE = 0,
EXTDATA_SCREENSHOT = 1,
@ -44,4 +46,6 @@ bool mCoreSaveStateNamed(struct mCore* core, struct VFile* vf, int flags);
bool mCoreLoadStateNamed(struct mCore* core, struct VFile* vf, int flags);
void* mCoreExtractState(struct mCore* core, struct VFile* vf, struct mStateExtdata* extdata);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "util/threading.h"
struct mCoreSync {
@ -36,4 +38,6 @@ void mCoreSyncLockAudio(struct mCoreSync* sync);
void mCoreSyncUnlockAudio(struct mCoreSync* sync);
void mCoreSyncConsumeAudio(struct mCoreSync* sync);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
#include "core/rewind.h"
#include "core/sync.h"
@ -97,4 +99,6 @@ void mCoreThreadSetRewinding(struct mCoreThread* threadContext, bool);
struct mCoreThread* mCoreThreadGet(void);
struct mLogger* mCoreThreadLogger(void);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
DECL_BITFIELD(mTileCacheConfiguration, uint32_t);
DECL_BIT(mTileCacheConfiguration, ShouldStore, 0);
@ -57,4 +59,6 @@ void mTileCacheSetPalette(struct mTileCache* cache, int palette);
const uint16_t* mTileCacheGetTile(struct mTileCache* cache, unsigned tileId, unsigned paletteId);
const uint16_t* mTileCacheGetTileIfDirty(struct mTileCache* cache, struct mTileCacheEntry* entry, unsigned tileId, unsigned paletteId);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
struct mTiming;
struct mTimingEvent {
void* context;
@ -37,4 +39,6 @@ int32_t mTimingTick(struct mTiming* timing, int32_t cycles);
int32_t mTimingCurrentTime(const struct mTiming* timing);
int32_t mTimingNextEvent(struct mTiming* timing);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "debugger.h"
struct CLIDebugger;
@ -86,4 +88,6 @@ void CLIDebuggerAttachBackend(struct CLIDebugger*, struct CLIDebuggerBackend*);
bool CLIDebuggerTabComplete(struct CLIDebugger*, const char* token, bool initial, size_t len);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "arm/arm.h"
#include "core/log.h"
#include "util/vector.h"
@ -111,5 +113,6 @@ void mDebuggerAttach(struct mDebugger*, struct mCore*);
void mDebuggerRun(struct mDebugger*);
void mDebuggerEnter(struct mDebugger*, enum mDebuggerEntryReason, struct mDebuggerEntryInfo*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "debugger/debugger.h"
#include "util/socket.h"
@ -47,4 +49,6 @@ void GDBStubShutdown(struct GDBStub*);
void GDBStubUpdate(struct GDBStub*);
CXX_GUARD_END
#endif

View File

@ -7,6 +7,9 @@
#define PARSER_H
#include "util/common.h"
CXX_GUARD_START
#include "debugger.h"
enum LexState {
@ -62,4 +65,6 @@ void parseLexedExpression(struct ParseTree* tree, struct LexVector* lv);
void lexFree(struct LexVector* lv);
void parseFree(struct ParseTree* tree);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "debugger/debugger.h"
struct mArguments {
@ -49,4 +51,6 @@ void version(const char* arg0);
void initParserForGraphics(struct mSubParser* parser, struct mGraphicsOpts* opts);
CXX_GUARD_END
#endif

View File

@ -6,9 +6,12 @@
#ifndef CLI_EL_BACKEND_H
#define CLI_EL_BACKEND_H
#include "debugger/cli-debugger.h"
#include "util/common.h"
CXX_GUARD_START
#include "debugger/cli-debugger.h"
#include <histedit.h>
struct CLIDebuggerEditLineBackend {
@ -20,4 +23,6 @@ struct CLIDebuggerEditLineBackend {
struct CLIDebuggerBackend* CLIDebuggerEditLineBackendCreate(void);
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef FFMPEG_ENCODER
#define FFMPEG_ENCODER
#include "util/common.h"
CXX_GUARD_START
#include "gba/gba.h"
#include <libavformat/avformat.h>
@ -83,4 +87,6 @@ bool FFmpegEncoderOpen(struct FFmpegEncoder*, const char* outfile);
void FFmpegEncoderClose(struct FFmpegEncoder*);
bool FFmpegEncoderIsOpen(struct FFmpegEncoder*);
CXX_GUARD_END
#endif

View File

@ -8,8 +8,12 @@
#include "util/common.h"
CXX_GUARD_START
struct mGUIRunner;
struct GUIMenuItem;
void mGUIShowConfig(struct mGUIRunner* runner, struct GUIMenuItem* extra, size_t nExtra);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/config.h"
#include "feature/gui/remap.h"
#include "gba/hardware.h"
@ -75,4 +77,6 @@ void mGUIDeinit(struct mGUIRunner*);
void mGUIRun(struct mGUIRunner*, const char* path);
void mGUIRunloop(struct mGUIRunner*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
struct GUIInputKeys {
const char* name;
uint32_t id;
@ -20,4 +22,6 @@ struct mInputMap;
void mGUIRemapKeys(struct GUIParams*, struct mInputMap*, const struct GUIInputKeys*);
CXX_GUARD_END
#endif

View File

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "imagemagick-gif-encoder.h"
#include "gba/gba.h"
#include "gba/video.h"
#include "util/string.h"

View File

@ -6,7 +6,11 @@
#ifndef IMAGEMAGICK_GIF_ENCODER
#define IMAGEMAGICK_GIF_ENCODER
#include "gba/gba.h"
#include "util/common.h"
CXX_GUARD_START
#include "core/interface.h"
#define MAGICKCORE_HDRI_ENABLE 0
#define MAGICKCORE_QUANTUM_DEPTH 8
@ -33,4 +37,6 @@ bool ImageMagickGIFEncoderOpen(struct ImageMagickGIFEncoder*, const char* outfil
bool ImageMagickGIFEncoderClose(struct ImageMagickGIFEncoder*);
bool ImageMagickGIFEncoderIsOpen(struct ImageMagickGIFEncoder*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/timing.h"
#include "third-party/blip_buf/blip_buf.h"
@ -240,4 +242,6 @@ struct GBSerializedState;
void GBAudioSerialize(const struct GBAudio* audio, struct GBSerializedState* state);
void GBAudioDeserialize(struct GBAudio* audio, const struct GBSerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/cheats.h"
#include "util/vector.h"
@ -36,4 +38,6 @@ struct GBCheatSet {
struct mCheatDevice* GBCheatDeviceCreate(void);
CXX_GUARD_END
#endif

View File

@ -6,7 +6,13 @@
#ifndef GB_CORE_H
#define GB_CORE_H
#include "util/common.h"
CXX_GUARD_START
struct mCore;
struct mCore* GBCoreCreate(void);
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef GB_CLI_H
#define GB_CLI_H
#include "util/common.h"
CXX_GUARD_START
#include "debugger/cli-debugger.h"
struct GBCLIDebugger {
@ -19,4 +23,6 @@ struct GBCLIDebugger {
struct CLIDebuggerSystem* GBCLIDebuggerCreate(struct mCore*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
#include "core/timing.h"
@ -141,4 +143,6 @@ void GBGetGameCode(const struct GB* gba, char* out);
void GBFrameEnded(struct GB* gb);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
enum GBModel {
GB_MODEL_AUTODETECT = 0xFF,
GB_MODEL_DMG = 0x00,
@ -32,4 +34,6 @@ enum GBMemoryBankControllerType {
GB_MBC5_RUMBLE = 0x105
};
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
mLOG_DECLARE_CATEGORY(GB_IO);
@ -118,4 +120,6 @@ struct GBSerializedState;
void GBIOSerialize(const struct GB* gb, struct GBSerializedState* state);
void GBIODeserialize(struct GB* gb, const struct GBSerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
mLOG_DECLARE_CATEGORY(GB_MBC);
@ -37,4 +39,6 @@ void GBMBCRTCWrite(struct GB* gb);
uint8_t GBMBC7Read(struct GBMemory*, uint16_t address);
void GBMBC7Write(struct GBMemory*, uint16_t address, uint8_t value);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
#include "core/timing.h"
#include "gb/interface.h"
@ -175,4 +177,6 @@ struct GBSerializedState;
void GBMemorySerialize(const struct GB* gb, struct GBSerializedState* state);
void GBMemoryDeserialize(struct GB* gb, const struct GBSerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "gb/interface.h"
struct GBCartridgeOverride {
@ -24,4 +26,6 @@ struct GB;
void GBOverrideApply(struct GB*, const struct GBCartridgeOverride*);
void GBOverrideApplyDefaults(struct GB*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/core.h"
#include "gb/gb.h"
#include "gb/video.h"
@ -36,4 +38,6 @@ struct GBVideoSoftwareRenderer {
void GBVideoSoftwareRendererCreate(struct GBVideoSoftwareRenderer*);
CXX_GUARD_END
#endif

View File

@ -8,10 +8,14 @@
#include "util/common.h"
CXX_GUARD_START
struct GBVideo;
struct mTileCache;
void GBVideoTileCacheInit(struct mTileCache* cache);
void GBVideoTileCacheAssociate(struct mTileCache* cache, struct GBVideo* video);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/core.h"
#include "gb/gb.h"
@ -370,4 +372,6 @@ struct GBSerializedState {
bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state);
void GBSerialize(struct GB* gb, struct GBSerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
#include "core/timing.h"
@ -53,4 +55,6 @@ void GBSIOSetDriver(struct GBSIO* sio, struct GBSIODriver* driver);
void GBSIOWriteSC(struct GBSIO* sio, uint8_t sc);
void GBSIOWriteSB(struct GBSIO* sio, uint8_t sb);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/lockstep.h"
#include "core/timing.h"
#include "gb/sio.h"
@ -42,4 +44,6 @@ void GBSIOLockstepNodeCreate(struct GBSIOLockstepNode*);
bool GBSIOLockstepAttachNode(struct GBSIOLockstep*, struct GBSIOLockstepNode*);
void GBSIOLockstepDetachNode(struct GBSIOLockstep*, struct GBSIOLockstepNode*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/timing.h"
DECL_BITFIELD(GBRegisterTAC, uint8_t);
@ -38,4 +40,6 @@ struct GBSerializedState;
void GBTimerSerialize(const struct GBTimer* timer, struct GBSerializedState* state);
void GBTimerDeserialize(struct GBTimer* timer, const struct GBSerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/interface.h"
#include "core/timing.h"
#include "gb/interface.h"
@ -143,4 +145,6 @@ struct GBSerializedState;
void GBVideoSerialize(const struct GBVideo* video, struct GBSerializedState* state);
void GBVideoDeserialize(struct GBVideo* video, const struct GBSerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
#include "gb/audio.h"
#include "util/circle-buffer.h"
@ -116,4 +118,6 @@ void GBAAudioDeserialize(struct GBAAudio* audio, const struct GBASerializedState
float GBAAudioCalculateRatio(float inputSampleRate, float desiredFPS, float desiredSampleRatio);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "arm/arm.h"
#include "core/log.h"
@ -20,4 +22,6 @@ uint32_t GBAChecksum(uint32_t* memory, size_t size);
extern const uint32_t GBA_BIOS_CHECKSUM;
extern const uint32_t GBA_DS_BIOS_CHECKSUM;
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "arm/arm.h"
#include "core/cheats.h"
@ -174,4 +176,6 @@ bool GBACheatAddVBALine(struct GBACheatSet*, const char* line);
int GBACheatAddressIsReal(uint32_t address);
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef GBA_CHEATS_GAMESHARK_H
#define GBA_CHEATS_GAMESHARK_H
#include "util/common.h"
CXX_GUARD_START
#include "gba/cheats.h"
extern const uint32_t GBACheatGameSharkSeeds[4];
@ -16,4 +20,6 @@ void GBACheatSetGameSharkVersion(struct GBACheatSet* cheats, int version);
bool GBACheatAddGameSharkRaw(struct GBACheatSet* cheats, uint32_t op1, uint32_t op2);
int GBACheatGameSharkProbability(uint32_t op1, uint32_t op2);
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef GBA_CHEATS_PARV3_H
#define GBA_CHEATS_PARV3_H
#include "util/common.h"
CXX_GUARD_START
#include "gba/cheats.h"
extern const uint32_t GBACheatProActionReplaySeeds[4];
@ -13,4 +17,6 @@ extern const uint32_t GBACheatProActionReplaySeeds[4];
bool GBACheatAddProActionReplayRaw(struct GBACheatSet* cheats, uint32_t op1, uint32_t op2);
int GBACheatProActionReplayProbability(uint32_t op1, uint32_t op2);
CXX_GUARD_END
#endif

View File

@ -6,7 +6,13 @@
#ifndef GBA_CORE_H
#define GBA_CORE_H
#include "util/common.h"
CXX_GUARD_START
struct mCore;
struct mCore* GBACoreCreate(void);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
struct GBA;
void GBADMAInit(struct GBA* gba);
void GBADMAReset(struct GBA* gba);
@ -23,4 +25,6 @@ void GBADMARunHblank(struct GBA* gba, int32_t cycles);
void GBADMARunVblank(struct GBA* gba, int32_t cycles);
void GBADMAUpdate(struct GBA* gba);
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef GBA_CLI_H
#define GBA_CLI_H
#include "util/common.h"
CXX_GUARD_START
#include "debugger/cli-debugger.h"
struct mCore;
@ -21,4 +25,6 @@ struct GBACLIDebugger {
struct GBACLIDebugger* GBACLIDebuggerCreate(struct mCore*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "arm/arm.h"
#include "core/log.h"
#include "core/timing.h"
@ -175,4 +177,6 @@ void GBAGetGameTitle(const struct GBA* gba, char* out);
void GBAFrameStarted(struct GBA* gba);
void GBAFrameEnded(struct GBA* gba);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "arm/macros.h"
#include "core/log.h"
#include "core/timing.h"
@ -144,4 +146,6 @@ struct GBASerializedState;
void GBAHardwareSerialize(const struct GBACartridgeHardware* gpio, struct GBASerializedState* state);
void GBAHardwareDeserialize(struct GBACartridgeHardware* gpio, const struct GBASerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,10 @@
#include "util/common.h"
CXX_GUARD_START
extern const uint8_t hleBios[];
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef GBA_INPUT_H
#define GBA_INPUT_H
#include "util/common.h"
CXX_GUARD_START
#include "core/input.h"
extern const struct mInputPlatformInfo GBAInputInfo;
@ -25,4 +29,6 @@ enum GBAKey {
GBA_KEY_NONE = -1
};
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/interface.h"
enum GBASIOMode {
@ -42,4 +44,6 @@ struct GBASIODriver {
uint16_t (*writeRegister)(struct GBASIODriver* driver, uint32_t address, uint16_t value);
};
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "gba/gba.h"
enum GBAIORegisters {
@ -173,4 +175,6 @@ struct GBASerializedState;
void GBAIOSerialize(struct GBA* gba, struct GBASerializedState* state);
void GBAIODeserialize(struct GBA* gba, const struct GBASerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "arm/arm.h"
#include "core/timing.h"
@ -180,4 +182,6 @@ struct GBASerializedState;
void GBAMemorySerialize(const struct GBAMemory* memory, struct GBASerializedState* state);
void GBAMemoryDeserialize(struct GBAMemory* memory, const struct GBASerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "gba/savedata.h"
#define IDLE_LOOP_NONE 0xFFFFFFFF
@ -28,4 +30,6 @@ struct GBA;
void GBAOverrideApply(struct GBA*, const struct GBACartridgeOverride*);
void GBAOverrideApplyDefaults(struct GBA*);
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef VIDEO_THREAD_PROXY_H
#define VIDEO_THREAD_PROXY_H
#include "util/common.h"
CXX_GUARD_START
#include "gba/video.h"
#include "util/threading.h"
#include "util/ring-fifo.h"
@ -38,4 +42,6 @@ struct GBAVideoThreadProxyRenderer {
void GBAVideoThreadProxyRendererCreate(struct GBAVideoThreadProxyRenderer* renderer, struct GBAVideoRenderer* backend);
CXX_GUARD_END
#endif

View File

@ -8,10 +8,14 @@
#include "util/common.h"
CXX_GUARD_START
struct GBAVideo;
struct mTileCache;
void GBAVideoTileCacheInit(struct mTileCache* cache);
void GBAVideoTileCacheAssociate(struct mTileCache* cache, struct GBAVideo* video);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/core.h"
#include "gba/video.h"
@ -162,4 +164,6 @@ struct GBAVideoSoftwareRenderer {
void GBAVideoSoftwareRendererCreate(struct GBAVideoSoftwareRenderer* renderer);
CXX_GUARD_START
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "gba/rr/rr.h"
struct GBA;
@ -80,4 +82,6 @@ void GBAMGMContextCreate(struct GBAMGMContext*);
bool GBAMGMSetStream(struct GBAMGMContext* mgm, struct VDir* stream);
bool GBAMGMCreateStream(struct GBAMGMContext* mgm, enum GBARRInitFrom initFrom);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
#include "gba/serialize.h"
@ -58,4 +60,6 @@ void GBARRDestroy(struct GBARRContext*);
void GBARRInitRecord(struct GBA*);
void GBARRInitPlay(struct GBA*);
CXX_GUARD_END
#endif

View File

@ -3,8 +3,13 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_VBM_H
#define GBA_VBM_H
#include "util/common.h"
CXX_GUARD_START
#include "gba/rr/rr.h"
struct GBAVBMContext {
@ -19,3 +24,7 @@ struct GBAVBMContext {
void GBAVBMContextCreate(struct GBAVBMContext*);
bool GBAVBMSetStream(struct GBAVBMContext*, struct VFile*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
mLOG_DECLARE_CATEGORY(GBA_SAVE);
@ -119,4 +121,6 @@ struct GBASerializedState;
void GBASavedataSerialize(const struct GBASavedata* savedata, struct GBASerializedState* state);
void GBASavedataDeserialize(struct GBASavedata* savedata, const struct GBASerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/core.h"
#include "gba/gba.h"
#include "gb/serialize.h"
@ -333,4 +335,6 @@ bool GBADeserialize(struct GBA* gba, const struct GBASerializedState* state);
struct GBASerializedState* GBAAllocateState(void);
void GBADeallocateState(struct GBASerializedState* state);
CXX_GUARD_END
#endif

View File

@ -8,10 +8,14 @@
#include "util/common.h"
CXX_GUARD_START
struct GBA;
struct VFile;
bool GBASavedataImportSharkPort(struct GBA* gba, struct VFile* vf, bool testChecksum);
bool GBASavedataExportSharkPort(const struct GBA* gba, struct VFile* vf);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/log.h"
#include "gba/interface.h"
@ -78,4 +80,6 @@ void GBASIOWriteRCNT(struct GBASIO* sio, uint16_t value);
void GBASIOWriteSIOCNT(struct GBASIO* sio, uint16_t value);
uint16_t GBASIOWriteRegister(struct GBASIO* sio, uint32_t address, uint16_t value);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/lockstep.h"
#include "core/timing.h"
#include "gba/sio.h"
@ -46,4 +48,6 @@ void GBASIOLockstepNodeCreate(struct GBASIOLockstepNode*);
bool GBASIOLockstepAttachNode(struct GBASIOLockstep*, struct GBASIOLockstepNode*);
void GBASIOLockstepDetachNode(struct GBASIOLockstep*, struct GBASIOLockstepNode*);
CXX_GUARD_END
#endif

View File

@ -7,6 +7,9 @@
#define GBA_TIMER_H
#include "util/common.h"
CXX_GUARD_START
#include "core/timing.h"
DECL_BITFIELD(GBATimerFlags, uint32_t);
@ -30,4 +33,6 @@ void GBATimerUpdateRegister(struct GBA* gba, int timer);
void GBATimerWriteTMCNT_LO(struct GBA* gba, int timer, uint16_t value);
void GBATimerWriteTMCNT_HI(struct GBA* gba, int timer, uint16_t value);
CXX_GUARD_END
#endif

View File

@ -11,6 +11,8 @@
#include "util/common.h"
CXX_GUARD_START
enum GBAVFameCartType {
VFAME_NO = 0,
VFAME_STANDARD = 1,
@ -31,4 +33,6 @@ void GBAVFameSramWrite(struct GBAVFameCart* cart, uint32_t address, uint8_t valu
uint32_t GBAVFameModifyRomAddress(struct GBAVFameCart* cart, uint32_t address, size_t romSize);
uint32_t GBAVFameGetPatternValue(uint32_t address, int bits);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/core.h"
#include "core/timing.h"
#include "gba/memory.h"
@ -199,4 +201,6 @@ void GBAVideoDeserialize(struct GBAVideo* video, const struct GBASerializedState
extern const int GBAVideoObjSizes[16][2];
CXX_GUARD_END
#endif

View File

@ -8,7 +8,11 @@
#include "util/common.h"
CXX_GUARD_START
struct CLIDebuggerSystem;
void LR35902CLIDebuggerCreate(struct CLIDebuggerSystem* debugger);
CXX_GUARD_END
#endif

View File

@ -3,6 +3,13 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef LR35902_DEBUGGER_H
#define LR35902_DEBUGGER_H
#include "util/common.h"
CXX_GUARD_START
#include "debugger/debugger.h"
struct LR35902DebugBreakpoint {
@ -28,3 +35,7 @@ struct LR35902Debugger {
};
struct mDebuggerPlatform* LR35902DebuggerPlatformCreate(void);
CXX_GUARD_END
#endif

View File

@ -8,9 +8,13 @@
#include "util/common.h"
CXX_GUARD_START
struct LR35902Core;
typedef void (*LR35902Instruction)(struct LR35902Core*);
extern const LR35902Instruction _lr35902InstructionTable[0x100];
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include "core/cpu.h"
#include "lr35902/isa-lr35902.h"
@ -167,4 +169,6 @@ void LR35902RaiseIRQ(struct LR35902Core* cpu, uint8_t vector);
void LR35902Tick(struct LR35902Core* cpu);
void LR35902Run(struct LR35902Core* cpu);
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef GL_H
#define GL_H
#include "util/common.h"
CXX_GUARD_START
#ifdef USE_EPOXY
#include <epoxy/gl.h>
#elif defined(__APPLE__)
@ -27,4 +31,6 @@ struct mGLContext {
void mGLContextCreate(struct mGLContext*);
CXX_GUARD_END
#endif

View File

@ -6,6 +6,10 @@
#ifndef GLES2_H
#define GLES2_H
#include "util/common.h"
CXX_GUARD_START
#ifdef USE_EPOXY
#include <epoxy/gl.h>
#elif defined(BUILD_GL)
@ -94,4 +98,6 @@ struct VDir;
bool mGLES2ShaderLoad(struct VideoShader*, struct VDir*);
void mGLES2ShaderFree(struct VideoShader*);
CXX_GUARD_END
#endif

View File

@ -8,6 +8,8 @@
#include "util/common.h"
CXX_GUARD_START
#include <pthread.h>
#include <sys/time.h>
#if defined(__FreeBSD__) || defined(__OpenBSD__)
@ -94,4 +96,6 @@ static inline int ThreadSetName(const char* name) {
#endif
}
CXX_GUARD_END
#endif

View File

@ -5,9 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AboutScreen.h"
extern "C" {
#include "core/version.h"
}
#include <QFile>
#include <QPixmap>

View File

@ -5,9 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ArchiveInspector.h"
extern "C" {
#include "util/vfs.h"
}
using namespace QGBA;

View File

@ -9,7 +9,6 @@
#include <QFontDatabase>
extern "C" {
#include "core/interface.h"
#ifdef M_CORE_GBA
#include "gba/memory.h"
@ -17,7 +16,6 @@ extern "C" {
#ifdef M_CORE_GB
#include "gb/memory.h"
#endif
}
using namespace QGBA;

View File

@ -10,9 +10,7 @@
#include "ui_AssetTile.h"
extern "C" {
#include "core/tile-cache.h"
}
namespace QGBA {

View File

@ -7,11 +7,9 @@
#include <QTimer>
extern "C" {
#ifdef M_CORE_GBA
#include "gba/gba.h"
#endif
}
using namespace QGBA;

View File

@ -7,10 +7,8 @@
#include "LogController.h"
extern "C" {
#include "core/thread.h"
#include "gba/audio.h"
}
using namespace QGBA;

View File

@ -10,9 +10,7 @@
#include <QAudioOutput>
extern "C" {
#include "core/thread.h"
}
using namespace QGBA;

View File

@ -7,9 +7,7 @@
#include "LogController.h"
extern "C" {
#include "core/thread.h"
}
using namespace QGBA;

View File

@ -9,9 +9,7 @@
#ifdef BUILD_SDL
extern "C" {
#include "platform/sdl/sdl-audio.h"
}
namespace QGBA {

View File

@ -10,9 +10,7 @@
#include <QSet>
extern "C" {
#include "core/cheats.h"
}
using namespace QGBA;

Some files were not shown because too many files have changed in this diff Show More