All: Migrate includes to separate directory
jump to
@@ -65,7 +65,7 @@ source_group("GBA board" FILES ${GBA_SRC} ${GBA_RENDERER_SRC} ${GBA_SIO_SRC})
source_group("GBA extra" FILES ${GBA_CHEATS_SRC} ${GBA_RR_SRC}) source_group("GB board" FILES ${GB_SRC} ${GB_SIO_SRC}) source_group("Utilities" FILES ${UTIL_SRC}) -include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/src) +include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/src) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type (e.g. Release or Debug)" FORCE)@@ -774,7 +774,7 @@ add_executable(${BINARY_NAME}-example-client ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/example/client-server/client.c)
target_link_libraries(${BINARY_NAME}-example-client ${BINARY_NAME} ${SDL_LIBRARY} ${SDLMAIN_LIBRARY} ${OPENGL_LIBRARY} ${OPENGLES2_LIBRARY}) set_target_properties(${BINARY_NAME}-example-client PROPERTIES COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES}" - INCLUDE_DIRECTORIES "${SDL_INCLUDE_DIR};${CMAKE_CURRENT_SOURCE_DIR}/src") + INCLUDE_DIRECTORIES "${SDL_INCLUDE_DIR};${CMAKE_CURRENT_SOURCE_DIR}/src;${CMAKE_CURRENT_SOURCE_DIR}/include") endif() endif()
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "arm.h" +#include <mgba/internal/arm/arm.h> -#include "isa-arm.h" -#include "isa-inlines.h" -#include "isa-thumb.h" +#include <mgba/internal/arm/isa-arm.h> +#include <mgba/internal/arm/isa-inlines.h> +#include <mgba/internal/arm/isa-thumb.h> static inline enum RegisterBank _ARMSelectBank(enum PrivilegeMode);
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ARM_H #define ARM_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/cpu.h" +#include <mgba/core/cpu.h> enum { ARM_SP = 13,
@@ -3,13 +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/. */ -#include "cli-debugger.h" +#include <mgba/internal/arm/debugger/cli-debugger.h> -#include "arm/debugger/debugger.h" -#include "arm/debugger/memory-debugger.h" -#include "arm/decoder.h" -#include "core/core.h" -#include "debugger/cli-debugger.h" +#include <mgba/core/core.h> +#include <mgba/internal/arm/debugger/debugger.h> +#include <mgba/internal/arm/debugger/memory-debugger.h> +#include <mgba/internal/arm/decoder.h> +#include <mgba/internal/debugger/cli-debugger.h> static void _printStatus(struct CLIDebuggerSystem*);
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ARM_CLI_DEBUGGER_H #define ARM_CLI_DEBUGGER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,12 +3,12 @@ *
* 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/. */ -#include "debugger.h" +#include <mgba/internal/arm/debugger/debugger.h> -#include "arm/arm.h" -#include "arm/isa-inlines.h" -#include "arm/debugger/memory-debugger.h" -#include "core/core.h" +#include <mgba/core/core.h> +#include <mgba/internal/arm/arm.h> +#include <mgba/internal/arm/isa-inlines.h> +#include <mgba/internal/arm/debugger/memory-debugger.h> DEFINE_VECTOR(ARMDebugBreakpointList, struct ARMDebugBreakpoint); DEFINE_VECTOR(ARMDebugWatchpointList, struct ARMDebugWatchpoint);
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ARM_DEBUGGER_H #define ARM_DEBUGGER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "debugger/debugger.h" +#include <mgba/internal/debugger/debugger.h> -#include "arm/arm.h" +#include <mgba/internal/arm/arm.h> struct ARMDebugBreakpoint { uint32_t address;
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "memory-debugger.h" +#include <mgba/internal/arm/debugger/memory-debugger.h> -#include "arm/debugger/debugger.h" +#include <mgba/internal/arm/debugger/debugger.h> -#include "util/math.h" +#include <mgba-util/math.h> #include <string.h>
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MEMORY_DEBUGGER_H #define MEMORY_DEBUGGER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "decoder.h" +#include <mgba/internal/arm/decoder.h> -#include "decoder-inlines.h" -#include "emitter-arm.h" -#include "isa-inlines.h" +#include <mgba/internal/arm/decoder-inlines.h> +#include <mgba/internal/arm/emitter-arm.h> +#include <mgba/internal/arm/isa-inlines.h> #define ADDR_MODE_1_SHIFT(OP) \ info->op3.reg = opcode & 0x0000000F; \
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "decoder.h" +#include <mgba/internal/arm/decoder.h> -#include "decoder-inlines.h" -#include "emitter-thumb.h" -#include "isa-inlines.h" +#include <mgba/internal/arm/decoder-inlines.h> +#include <mgba/internal/arm/emitter-thumb.h> +#include <mgba/internal/arm/isa-inlines.h> #define DEFINE_THUMB_DECODER(NAME, MNEMONIC, BODY) \ static void _ThumbDecode ## NAME (uint16_t opcode, struct ARMInstructionInfo* info) { \
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "decoder.h" +#include <mgba/internal/arm/decoder.h> -#include "decoder-inlines.h" +#include <mgba/internal/arm/decoder-inlines.h> #define ADVANCE(AMOUNT) \ if (AMOUNT > blen) { \
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ARM_DECODER_H #define ARM_DECODER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "arm.h" +#include <mgba/internal/arm/arm.h> // Bit 0: a register is involved with this operand // Bit 1: an immediate is invovled with this operand
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "isa-arm.h" +#include <mgba/internal/arm/isa-arm.h> -#include "arm.h" -#include "emitter-arm.h" -#include "isa-inlines.h" +#include <mgba/internal/arm/arm.h> +#include <mgba/internal/arm/emitter-arm.h> +#include <mgba/internal/arm/isa-inlines.h> #define PSR_USER_MASK 0xF0000000 #define PSR_PRIV_MASK 0x000000CF
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ISA_ARM_H #define ISA_ARM_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "isa-thumb.h" +#include <mgba/internal/arm/isa-thumb.h> -#include "isa-inlines.h" -#include "emitter-thumb.h" +#include <mgba/internal/arm/isa-inlines.h> +#include <mgba/internal/arm/emitter-thumb.h> // Instruction definitions // Beware pre-processor insanity
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ISA_THUMB_H #define ISA_THUMB_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MACROS_H #define MACROS_H -#include "util/common.h" +#include <mgba-util/common.h> #define LOAD_64 LOAD_64LE #define LOAD_32 LOAD_32LE
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "cheats.h" +#include <mgba/core/cheats.h> -#include "core/core.h" -#include "util/string.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba-util/string.h> +#include <mgba-util/vfs.h> #define MAX_LINE_LENGTH 128
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CHEATS_H #define CHEATS_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/cpu.h" -#include "core/log.h" -#include "util/vector.h" +#include <mgba/core/cpu.h> +#include <mgba/core/log.h> +#include <mgba-util/vector.h> #define MAX_ROM_PATCHES 4
@@ -3,12 +3,12 @@ *
* 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/. */ -#include "config.h" +#include <mgba/core/config.h> -#include "core/version.h" -#include "util/formatting.h" -#include "util/string.h" -#include "util/vfs.h" +#include <mgba/core/version.h> +#include <mgba-util/formatting.h> +#include <mgba-util/string.h> +#include <mgba-util/vfs.h> #include <sys/stat.h>@@ -24,7 +24,7 @@ #include <psp2/io/stat.h>
#endif #ifdef _3DS -#include "platform/3ds/3ds-vfs.h" +#include <mgba-util/platform/3ds/3ds-vfs.h> #endif #define SECTION_NAME_MAX 128
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_CORE_CONFIG_H #define M_CORE_CONFIG_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "util/configuration.h" +#include <mgba-util/configuration.h> struct mCoreConfig { struct Configuration configTable;
@@ -3,19 +3,20 @@ *
* 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/. */ -#include "core.h" +#include <mgba/core/core.h> -#include "core/log.h" -#include "core/serialize.h" -#include "util/vfs.h" +#include <mgba/core/log.h> +#include <mgba/core/serialize.h> +#include <mgba-util/vfs.h> #ifdef M_CORE_GB -#include "gb/core.h" -#include "gb/gb.h" +#include <mgba/gb/core.h> +// TODO: Fix layering violation +#include <mgba/internal/gb/gb.h> #endif #ifdef M_CORE_GBA -#include "gba/core.h" -#include "gba/gba.h" +#include <mgba/gba/core.h> +#include <mgba/internal/gba/gba.h> #endif static struct mCoreFilter {@@ -62,7 +63,7 @@ return PLATFORM_NONE;
} #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 -#include "util/png-io.h" +#include <mgba-util/png-io.h> #ifdef PSP2 #include <psp2/photoexport.h>
@@ -6,20 +6,21 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_CORE_H #define M_CORE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/config.h" +#include <mgba/core/config.h> #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 -#include "core/directories.h" +#include <mgba/core/directories.h> #endif #ifndef MINIMAL_CORE -#include "core/input.h" +#include <mgba/core/input.h> #endif -#include "core/interface.h" +#include <mgba/core/interface.h> #ifdef USE_DEBUGGERS -#include "debugger/debugger.h" +// TODO: Fix layering violation +#include <mgba/internal/debugger/debugger.h> #endif enum mPlatform {
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_CPU_H #define M_CPU_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "directories.h" +#include <mgba/core/directories.h> -#include "core/config.h" -#include "util/vfs.h" +#include <mgba/core/config.h> +#include <mgba-util/vfs.h> #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 void mDirectorySetInit(struct mDirectorySet* dirs) {
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef DIRECTORIES_H #define DIRECTORIES_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "input.h" +#include <mgba/core/input.h> -#include "util/configuration.h" -#include "util/table.h" +#include <mgba-util/configuration.h> +#include <mgba-util/table.h> #include <inttypes.h>
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_INPUT_H #define M_INPUT_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "interface.h" +#include <mgba/core/interface.h> -#include "core/core.h" +#include <mgba/core/core.h> #include <time.h> static time_t _rtcGenericCallback(struct mRTCSource* source) {
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CORE_INTERFACE_H #define CORE_INTERFACE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "library.h" +#include <mgba/core/library.h> -#include "util/vfs.h" +#include <mgba-util/vfs.h> DEFINE_VECTOR(mLibraryListing, struct mLibraryEntry);
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_LIBRARY_H #define M_LIBRARY_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/core.h" -#include "util/vector.h" +#include <mgba/core/core.h> +#include <mgba-util/vector.h> struct mLibraryEntry { char* filename;
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "lockstep.h" +#include <mgba/core/lockstep.h> void mLockstepInit(struct mLockstep* lockstep) { lockstep->attached = 0;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef SIO_LOCKSTEP_H #define SIO_LOCKSTEP_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "log.h" +#include <mgba/core/log.h> -#include "core/thread.h" +#include <mgba/core/thread.h> #define MAX_CATEGORY 64
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_LOG_H #define M_LOG_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "rewind.h" +#include <mgba/core/rewind.h> -#include "core/core.h" -#include "util/patch-fast.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba-util/patch/fast.h> +#include <mgba-util/vfs.h> DEFINE_VECTOR(mCoreRewindPatches, struct PatchFast);
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_CORE_REWIND_H #define M_CORE_REWIND_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "util/vector.h" +#include <mgba-util/vector.h> DECLARE_VECTOR(mCoreRewindPatches, struct PatchFast);
@@ -3,15 +3,15 @@ *
* 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/. */ -#include "serialize.h" +#include <mgba/core/serialize.h> -#include "core/core.h" -#include "core/cheats.h" -#include "util/memory.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba/core/cheats.h> +#include <mgba-util/memory.h> +#include <mgba-util/vfs.h> #ifdef USE_PNG -#include "util/png-io.h" +#include <mgba-util/png-io.h> #include <png.h> #include <zlib.h> #endif
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_SERIALIZE_H #define M_SERIALIZE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "sync.h" +#include <mgba/core/sync.h> static void _changeVideoSync(struct mCoreSync* sync, bool frameOn) { // Make sure the video thread can process events while the GBA thread is paused
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_CORE_SYNC_H #define M_CORE_SYNC_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "util/threading.h" +#include <mgba-util/threading.h> struct mCoreSync { int videoFramePending;
@@ -5,8 +5,8 @@ * 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/. */ #include "util/test/suite.h" -#include "core/core.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba-util/vfs.h> #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 M_TEST_DEFINE(findNullPath) {
@@ -5,7 +5,7 @@ * 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 TEST_M_CORE_H #define TEST_M_CORE_H -#include "util/common.h" +#include <mgba-util/common.h> int TestRunCore(void);
@@ -3,13 +3,11 @@ *
* 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/. */ -#include "thread.h" - -#include "core/core.h" -#include "util/patch.h" -#include "util/vfs.h" +#include <mgba/core/thread.h> -#include "feature/commandline.h" +#include <mgba/core/core.h> +#include <mgba-util/patch.h> +#include <mgba-util/vfs.h> #include <signal.h>
@@ -6,14 +6,14 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_CORE_THREAD_H #define M_CORE_THREAD_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" -#include "core/rewind.h" -#include "core/sync.h" -#include "util/threading.h" +#include <mgba/core/log.h> +#include <mgba/core/rewind.h> +#include <mgba/core/sync.h> +#include <mgba-util/threading.h> struct mCoreThread; struct mCore;
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "tile-cache.h" +#include <mgba/core/tile-cache.h> -#include "util/memory.h" +#include <mgba-util/memory.h> void mTileCacheInit(struct mTileCache* cache) { // TODO: Reconfigurable cache for space savings
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_TILE_CACHE_H #define M_TILE_CACHE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "timing.h" +#include <mgba/core/timing.h> void mTimingInit(struct mTiming* timing, int32_t* relativeCycles, int32_t* nextEvent) { timing->root = NULL;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef M_CORE_TIMING #define M_CORE_TIMING -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "core/version.h" +#include <mgba/core/version.h> const char* const gitCommit = "${GIT_COMMIT}"; const char* const gitCommitShort = "${GIT_COMMIT_SHORT}";
@@ -3,12 +3,12 @@ *
* 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/. */ -#include "cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> -#include "core/core.h" -#include "core/version.h" -#include "debugger/parser.h" -#include "util/string.h" +#include <mgba/core/core.h> +#include <mgba/core/version.h> +#include <mgba/internal/debugger/parser.h> +#include <mgba-util/string.h> #if !defined(NDEBUG) && !defined(_WIN32) #include <signal.h>
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CLI_DEBUGGER_H #define CLI_DEBUGGER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "debugger.h" +#include <mgba/internal/debugger/debugger.h> struct CLIDebugger;
@@ -3,14 +3,14 @@ *
* 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/. */ -#include "debugger.h" +#include <mgba/internal/debugger/debugger.h> -#include "core/core.h" +#include <mgba/core/core.h> -#include "debugger/cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> #ifdef USE_GDB_STUB -#include "debugger/gdb-stub.h" +#include <mgba/internal/debugger/gdb-stub.h> #endif const uint32_t DEBUGGER_ID = 0xDEADBEEF;
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef DEBUGGER_H #define DEBUGGER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/cpu.h" -#include "core/log.h" -#include "util/vector.h" +#include <mgba/core/cpu.h> +#include <mgba/core/log.h> +#include <mgba-util/vector.h> mLOG_DECLARE_CATEGORY(DEBUGGER);
@@ -3,12 +3,12 @@ *
* 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/. */ -#include "gdb-stub.h" +#include <mgba/internal/debugger/gdb-stub.h> -#include "arm/debugger/debugger.h" -#include "arm/isa-inlines.h" -#include "core/core.h" -#include "gba/memory.h" +#include <mgba/core/core.h> +#include <mgba/internal/arm/debugger/debugger.h> +#include <mgba/internal/arm/isa-inlines.h> +#include <mgba/internal/gba/memory.h> #include <signal.h>
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GDB_STUB_H #define GDB_STUB_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "debugger/debugger.h" +#include <mgba/internal/debugger/debugger.h> -#include "util/socket.h" +#include <mgba-util/socket.h> #define GDB_STUB_MAX_LINE 1200 #define GDB_STUB_INTERVAL 32
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "parser.h" +#include <mgba/internal/debugger/parser.h> -#include "util/string.h" +#include <mgba-util/string.h> static struct LexVector* _lexOperator(struct LexVector* lv, char operator) { struct LexVector* lvNext = malloc(sizeof(struct LexVector));
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef PARSER_H #define PARSER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "debugger.h" +#include <mgba/internal/debugger/debugger.h> enum LexState { LEX_ERROR = -1,
@@ -5,13 +5,13 @@ * 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/. */ #include "commandline.h" -#include "core/config.h" -#include "core/version.h" -#include "util/string.h" +#include <mgba/core/config.h> +#include <mgba/core/version.h> +#include <mgba-util/string.h> #include <fcntl.h> #ifdef _MSC_VER -#include "platform/windows/getopt.h" +#include <mgba-util/platform/windows/getopt.h> #else #include <getopt.h> #endif
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef COMMAND_LINE_H #define COMMAND_LINE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "debugger/debugger.h" +#include <mgba/internal/debugger/debugger.h> struct mArguments { char* fname;
@@ -5,7 +5,7 @@ * 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/. */ #include "cli-el-backend.h" -#include "core/version.h" +#include <mgba/core/version.h> #include <signal.h>
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CLI_EL_BACKEND_H #define CLI_EL_BACKEND_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "debugger/cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> #include <histedit.h>
@@ -5,8 +5,8 @@ * 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/. */ #include "ffmpeg-encoder.h" -#include "core/core.h" -#include "gba/video.h" +#include <mgba/core/core.h> +#include <mgba/internal/gba/video.h> #include <libavcodec/version.h> #include <libavcodec/avcodec.h>
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef FFMPEG_ENCODER #define FFMPEG_ENCODER -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "gba/gba.h" +#include <mgba/internal/gba/gba.h> #include <libavformat/avformat.h> #include <libavcodec/version.h>
@@ -5,13 +5,13 @@ * 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/. */ #include "gui-config.h" -#include "core/config.h" -#include "core/core.h" +#include <mgba/core/config.h> +#include <mgba/core/core.h> #include "feature/gui/gui-runner.h" #include "feature/gui/remap.h" -#include "gba/gba.h" -#include "util/gui/file-select.h" -#include "util/gui/menu.h" +#include <mgba/internal/gba/gba.h> +#include <mgba-util/gui/file-select.h> +#include <mgba-util/gui/menu.h> #ifndef GUI_MAX_INPUTS #define GUI_MAX_INPUTS 7
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GUI_CONFIG_H #define GUI_CONFIG_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -5,18 +5,18 @@ * 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/. */ #include "gui-runner.h" -#include "core/core.h" -#include "core/serialize.h" +#include <mgba/core/core.h> +#include <mgba/core/serialize.h> #include "feature/gui/gui-config.h" -#include "gba/gba.h" -#include "gba/input.h" -#include "gba/interface.h" -#include "util/gui/file-select.h" -#include "util/gui/font.h" -#include "util/gui/menu.h" -#include "util/memory.h" -#include "util/png-io.h" -#include "util/vfs.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/input.h> +#include <mgba/gba/interface.h> +#include <mgba-util/gui/file-select.h> +#include <mgba-util/gui/font.h> +#include <mgba-util/gui/menu.h> +#include <mgba-util/memory.h> +#include <mgba-util/png-io.h> +#include <mgba-util/vfs.h> #ifdef _3DS #include <3ds.h>
@@ -6,15 +6,15 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GUI_RUNNER_H #define GUI_RUNNER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/config.h" +#include <mgba/core/config.h> #include "feature/gui/remap.h" -#include "gba/hardware.h" -#include "util/circle-buffer.h" -#include "util/gui.h" +#include <mgba/internal/gba/hardware.h> +#include <mgba-util/circle-buffer.h> +#include <mgba-util/gui.h> enum mGUIInput { mGUI_INPUT_INCREASE_BRIGHTNESS = GUI_INPUT_USER_START,
@@ -5,8 +5,8 @@ * 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/. */ #include "remap.h" -#include "util/gui.h" -#include "util/gui/menu.h" +#include <mgba-util/gui.h> +#include <mgba-util/gui/menu.h> void mGUIRemapKeys(struct GUIParams* params, struct mInputMap* map, const struct GUIInputKeys* keys) { struct GUIMenu menu = {
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GUI_REMAP_H #define GUI_REMAP_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -5,9 +5,9 @@ * 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/. */ #include "imagemagick-gif-encoder.h" -#include "gba/gba.h" -#include "gba/video.h" -#include "util/string.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/video.h> +#include <mgba-util/string.h> static void _magickPostVideoFrame(struct mAVStream*, const color_t* pixels, size_t stride); static void _magickVideoDimensionsChanged(struct mAVStream*, unsigned width, unsigned height);
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef IMAGEMAGICK_GIF_ENCODER #define IMAGEMAGICK_GIF_ENCODER -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/interface.h" +#include <mgba/core/interface.h> #define MAGICKCORE_HDRI_ENABLE 0 #define MAGICKCORE_QUANTUM_DEPTH 8
@@ -3,13 +3,14 @@ *
* 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/. */ -#include "audio.h" +#include <mgba/internal/gb/audio.h> -#include "core/interface.h" -#include "core/sync.h" -#include "gb/gb.h" -#include "gb/serialize.h" -#include "gb/io.h" +#include <mgba/core/blip_buf.h> +#include <mgba/core/interface.h> +#include <mgba/core/sync.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/serialize.h> +#include <mgba/internal/gb/io.h> #ifdef _3DS #define blip_add_delta blip_add_delta_fast
@@ -6,12 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_AUDIO_H #define GB_AUDIO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/timing.h" -#include "third-party/blip_buf/blip_buf.h" +#include <mgba/core/timing.h> DECL_BITFIELD(GBAudioRegisterDuty, uint8_t); DECL_BITS(GBAudioRegisterDuty, Length, 0, 6);@@ -157,8 +156,8 @@ struct GBAudioSquareChannel ch2;
struct GBAudioWaveChannel ch3; struct GBAudioNoiseChannel ch4; - blip_t* left; - blip_t* right; + struct blip_t* left; + struct blip_t* right; int16_t lastLeft; int16_t lastRight; int clock;
@@ -3,12 +3,12 @@ *
* 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/. */ -#include "cheats.h" +#include <mgba/internal/gb/cheats.h> -#include "core/core.h" -#include "gb/gb.h" -#include "gb/memory.h" -#include "util/string.h" +#include <mgba/core/core.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/memory.h> +#include <mgba-util/string.h> DEFINE_VECTOR(GBCheatPatchList, struct GBCheatPatch);
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_CHEATS_H #define GB_CHEATS_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/cheats.h" -#include "util/vector.h" +#include <mgba/core/cheats.h> +#include <mgba-util/vector.h> enum GBCheatType { GB_CHEAT_AUTODETECT,
@@ -3,21 +3,22 @@ *
* 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/. */ -#include "core.h" +#include <mgba/gb/core.h> -#include "core/core.h" -#include "gb/cheats.h" -#include "gb/extra/cli.h" -#include "gb/gb.h" -#include "gb/mbc.h" -#include "gb/overrides.h" -#include "gb/renderers/software.h" -#include "gb/serialize.h" -#include "lr35902/debugger/debugger.h" -#include "util/crc32.h" -#include "util/memory.h" -#include "util/patch.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba/internal/gb/cheats.h> +#include <mgba/internal/gb/extra/cli.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/mbc.h> +#include <mgba/internal/gb/overrides.h> +#include <mgba/internal/gb/renderers/software.h> +#include <mgba/internal/gb/serialize.h> +#include <mgba/internal/lr35902/lr35902.h> +#include <mgba/internal/lr35902/debugger/debugger.h> +#include <mgba-util/crc32.h> +#include <mgba-util/memory.h> +#include <mgba-util/patch.h> +#include <mgba-util/vfs.h> struct GBCore { struct mCore d;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_CORE_H #define GB_CORE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,14 +3,14 @@ *
* 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/. */ -#include "cli.h" +#include <mgba/internal/gb/extra/cli.h> -#include "core/core.h" -#include "core/serialize.h" -#include "gb/gb.h" -#include "gb/io.h" -#include "gb/video.h" -#include "lr35902/debugger/cli-debugger.h" +#include <mgba/core/core.h> +#include <mgba/core/serialize.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/io.h> +#include <mgba/internal/gb/video.h> +#include <mgba/internal/lr35902/debugger/cli-debugger.h> static void _GBCLIDebuggerInit(struct CLIDebuggerSystem*); static bool _GBCLIDebuggerCustom(struct CLIDebuggerSystem*);
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_CLI_H #define GB_CLI_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "debugger/cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> struct GBCLIDebugger { struct CLIDebuggerSystem d;
@@ -3,18 +3,19 @@ *
* 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/. */ -#include "gb.h" +#include <mgba/internal/gb/gb.h> -#include "gb/io.h" -#include "gb/mbc.h" +#include <mgba/internal/gb/io.h> +#include <mgba/internal/gb/mbc.h> +#include <mgba/internal/lr35902/lr35902.h> -#include "core/core.h" -#include "core/cheats.h" -#include "util/crc32.h" -#include "util/memory.h" -#include "util/math.h" -#include "util/patch.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba/core/cheats.h> +#include <mgba-util/crc32.h> +#include <mgba-util/memory.h> +#include <mgba-util/math.h> +#include <mgba-util/patch.h> +#include <mgba-util/vfs.h> #define CLEANUP_THRESHOLD 15
@@ -6,21 +6,19 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_H #define GB_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" -#include "core/timing.h" - -#include "lr35902/lr35902.h" +#include <mgba/core/cpu.h> +#include <mgba/core/log.h> +#include <mgba/core/timing.h> -#include "gb/audio.h" -#include "gb/interface.h" -#include "gb/memory.h" -#include "gb/sio.h" -#include "gb/timer.h" -#include "gb/video.h" +#include <mgba/internal/gb/audio.h> +#include <mgba/internal/gb/memory.h> +#include <mgba/internal/gb/sio.h> +#include <mgba/internal/gb/timer.h> +#include <mgba/internal/gb/video.h> extern const uint32_t DMG_LR35902_FREQUENCY; extern const uint32_t CGB_LR35902_FREQUENCY;@@ -45,6 +43,7 @@ GB_VECTOR_SIO = 0x58,
GB_VECTOR_KEYPAD = 0x60, }; +struct LR35902Core; struct mCoreSync; struct mAVStream; struct mCoreCallbacks;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_INTERFACE_H #define GB_INTERFACE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "io.h" +#include <mgba/internal/gb/io.h> -#include "gb/gb.h" -#include "gb/sio.h" -#include "gb/serialize.h" +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/sio.h> +#include <mgba/internal/gb/serialize.h> mLOG_DEFINE_CATEGORY(GB_IO, "GB I/O");
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_IO_H #define GB_IO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" +#include <mgba/core/log.h> mLOG_DECLARE_CATEGORY(GB_IO);
@@ -3,11 +3,12 @@ *
* 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/. */ -#include "mbc.h" +#include <mgba/internal/gb/mbc.h> -#include "gb/gb.h" -#include "gb/memory.h" -#include "util/vfs.h" +#include <mgba/core/interface.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/memory.h> +#include <mgba-util/vfs.h> mLOG_DEFINE_CATEGORY(GB_MBC, "GB MBC");
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_MBC_H #define GB_MBC_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" +#include <mgba/core/log.h> mLOG_DECLARE_CATEGORY(GB_MBC);
@@ -3,15 +3,16 @@ *
* 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/. */ -#include "memory.h" +#include <mgba/internal/gb/memory.h> -#include "core/interface.h" -#include "gb/gb.h" -#include "gb/io.h" -#include "gb/mbc.h" -#include "gb/serialize.h" +#include <mgba/core/interface.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/io.h> +#include <mgba/internal/gb/mbc.h> +#include <mgba/internal/gb/serialize.h> +#include <mgba/internal/lr35902/lr35902.h> -#include "util/memory.h" +#include <mgba-util/memory.h> mLOG_DEFINE_CATEGORY(GB_MEM, "GB Memory");
@@ -6,14 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_MEMORY_H #define GB_MEMORY_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" -#include "core/timing.h" -#include "gb/interface.h" -#include "lr35902/lr35902.h" +#include <mgba/core/log.h> +#include <mgba/core/timing.h> +#include <mgba/gb/interface.h> #include <time.h>@@ -154,6 +153,7 @@ struct mRotationSource* rotation;
struct mRumble* rumble; }; +struct LR35902Core; void GBMemoryInit(struct GB* gb); void GBMemoryDeinit(struct GB* gb);
@@ -3,12 +3,12 @@ *
* 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/. */ -#include "overrides.h" +#include <mgba/internal/gb/overrides.h> -#include "gb/gb.h" +#include <mgba/internal/gb/gb.h> -#include "util/configuration.h" -#include "util/crc32.h" +#include <mgba-util/configuration.h> +#include <mgba-util/crc32.h> static const struct GBCartridgeOverride _overrides[] = { // None yet
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_OVERRIDES_H #define GB_OVERRIDES_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "gb/interface.h" +#include <mgba/gb/interface.h> struct GBCartridgeOverride { int headerCrc32;
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "software.h" +#include <mgba/internal/gb/renderers/software.h> -#include "core/tile-cache.h" -#include "gb/io.h" -#include "util/memory.h" +#include <mgba/core/tile-cache.h> +#include <mgba/internal/gb/io.h> +#include <mgba-util/memory.h> static void GBVideoSoftwareRendererInit(struct GBVideoRenderer* renderer, enum GBModel model); static void GBVideoSoftwareRendererDeinit(struct GBVideoRenderer* renderer);
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_RENDERER_SOFTWARE_H #define GB_RENDERER_SOFTWARE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/core.h" -#include "gb/gb.h" -#include "gb/video.h" +#include <mgba/core/core.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/video.h> struct GBVideoSoftwareRenderer { struct GBVideoRenderer d;
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "tile-cache.h" +#include <mgba/internal/gb/renderers/tile-cache.h> -#include "core/tile-cache.h" -#include "gb/video.h" -#include "gb/renderers/tile-cache.h" +#include <mgba/core/tile-cache.h> +#include <mgba/internal/gb/video.h> +#include <mgba/internal/gb/renderers/tile-cache.h> void GBVideoTileCacheInit(struct mTileCache* cache) { mTileCacheInit(cache);
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_TILE_CACHE_H #define GB_TILE_CACHE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,10 +3,11 @@ *
* 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/. */ -#include "serialize.h" +#include <mgba/internal/gb/serialize.h> -#include "gb/io.h" -#include "gb/timer.h" +#include <mgba/internal/gb/io.h> +#include <mgba/internal/gb/timer.h> +#include <mgba/internal/lr35902/lr35902.h> mLOG_DEFINE_CATEGORY(GB_STATE, "GB Savestate");
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_SERIALIZE_H #define GB_SERIALIZE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/core.h" -#include "gb/gb.h" +#include <mgba/core/core.h> +#include <mgba/internal/gb/gb.h> extern const uint32_t GB_SAVESTATE_MAGIC; extern const uint32_t GB_SAVESTATE_VERSION;
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "sio.h" +#include <mgba/internal/gb/sio.h> -#include "gb/gb.h" -#include "gb/io.h" -#include "gb/serialize.h" +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/io.h> +#include <mgba/internal/gb/serialize.h> mLOG_DEFINE_CATEGORY(GB_SIO, "GB Serial I/O");
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_SIO_H #define GB_SIO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" -#include "core/timing.h" +#include <mgba/core/log.h> +#include <mgba/core/timing.h> #define MAX_GBS 2
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "lockstep.h" +#include <mgba/internal/gb/sio/lockstep.h> -#include "gb/gb.h" -#include "gb/io.h" +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/io.h> #define LOCKSTEP_INCREMENT 512
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_SIO_LOCKSTEP_H #define GB_SIO_LOCKSTEP_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/lockstep.h" -#include "core/timing.h" -#include "gb/sio.h" +#include <mgba/core/lockstep.h> +#include <mgba/core/timing.h> +#include <mgba/internal/gb/sio.h> struct GBSIOLockstep { struct mLockstep d;
@@ -5,10 +5,10 @@ * 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/. */ #include "util/test/suite.h" -#include "core/core.h" -#include "gb/core.h" -#include "gb/gb.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba/gb/core.h> +#include <mgba/internal/gb/gb.h> +#include <mgba-util/vfs.h> M_TEST_DEFINE(create) { struct mCore* core = GBCoreCreate();
@@ -5,7 +5,7 @@ * 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 TEST_GB_H #define TEST_GB_H -#include "util/common.h" +#include <mgba-util/common.h> int TestRunGB(void);
@@ -5,11 +5,11 @@ * 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/. */ #include "util/test/suite.h" -#include "core/core.h" -#include "gb/core.h" -#include "gb/gb.h" -#include "gb/mbc.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba/gb/core.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/mbc.h> +#include <mgba-util/vfs.h> M_TEST_SUITE_SETUP(GBMBC) { struct VFile* vf = VFileMemChunk(NULL, 2048);
@@ -5,11 +5,11 @@ * 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/. */ #include "util/test/suite.h" -#include "core/core.h" -#include "gb/core.h" -#include "gb/gb.h" -#include "gb/mbc.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba/gb/core.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/mbc.h> +#include <mgba-util/vfs.h> M_TEST_SUITE_SETUP(GBMemory) { struct VFile* vf = VFileMemChunk(NULL, GB_SIZE_CART_BANK0 * 4);
@@ -5,11 +5,11 @@ * 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/. */ #include "util/test/suite.h" -#include "core/core.h" -#include "gb/core.h" -#include "gb/gb.h" -#include "gb/mbc.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba/gb/core.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/mbc.h> +#include <mgba-util/vfs.h> struct GBRTCTest { struct mRTCSource d;
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "timer.h" +#include <mgba/internal/gb/timer.h> -#include "gb/gb.h" -#include "gb/io.h" -#include "gb/serialize.h" +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/io.h> +#include <mgba/internal/gb/serialize.h> void _GBTimerIRQ(struct mTiming* timing, void* context, uint32_t cyclesLate) { UNUSED(timing);
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_TIMER_H #define GB_TIMER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/timing.h" +#include <mgba/core/timing.h> DECL_BITFIELD(GBRegisterTAC, uint8_t); DECL_BITS(GBRegisterTAC, Clock, 0, 2);
@@ -3,16 +3,17 @@ *
* 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/. */ -#include "video.h" +#include <mgba/internal/gb/video.h> -#include "core/sync.h" -#include "core/thread.h" -#include "core/tile-cache.h" -#include "gb/gb.h" -#include "gb/io.h" -#include "gb/serialize.h" +#include <mgba/core/sync.h> +#include <mgba/core/thread.h> +#include <mgba/core/tile-cache.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/io.h> +#include <mgba/internal/gb/serialize.h> +#include <mgba/internal/lr35902/lr35902.h> -#include "util/memory.h" +#include <mgba-util/memory.h> static void GBVideoDummyRendererInit(struct GBVideoRenderer* renderer, enum GBModel model); static void GBVideoDummyRendererDeinit(struct GBVideoRenderer* renderer);
@@ -6,14 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GB_VIDEO_H #define GB_VIDEO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/interface.h" -#include "core/timing.h" -#include "gb/interface.h" -#include "gb/memory.h" +#include <mgba/core/timing.h> +#include <mgba/gb/interface.h> enum { GB_VIDEO_HORIZONTAL_PIXELS = 160,@@ -55,7 +53,6 @@ struct GBObj obj[40];
uint8_t raw[160]; }; -enum GBModel; struct mTileCache; struct GBVideoRenderer { void (*init)(struct GBVideoRenderer* renderer, enum GBModel model);
@@ -3,14 +3,16 @@ *
* 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/. */ -#include "audio.h" +#include <mgba/internal/gba/audio.h> -#include "core/sync.h" -#include "gba/dma.h" -#include "gba/gba.h" -#include "gba/io.h" -#include "gba/serialize.h" -#include "gba/video.h" +#include <mgba/internal/arm/macros.h> +#include <mgba/core/blip_buf.h> +#include <mgba/core/sync.h> +#include <mgba/internal/gba/dma.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> +#include <mgba/internal/gba/serialize.h> +#include <mgba/internal/gba/video.h> #ifdef _3DS #define blip_add_delta blip_add_delta_fast
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_AUDIO_H #define GBA_AUDIO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" -#include "gb/audio.h" -#include "util/circle-buffer.h" +#include <mgba/core/log.h> +#include <mgba/internal/gb/audio.h> +#include <mgba-util/circle-buffer.h> mLOG_DECLARE_CATEGORY(GBA_AUDIO);
@@ -3,13 +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/. */ -#include "bios.h" +#include <mgba/internal/gba/bios.h> -#include "arm/isa-inlines.h" -#include "arm/macros.h" -#include "gba/gba.h" -#include "gba/io.h" -#include "gba/memory.h" +#include <mgba/internal/arm/isa-inlines.h> +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> +#include <mgba/internal/gba/memory.h> const uint32_t GBA_BIOS_CHECKSUM = 0xBAAE187F; const uint32_t GBA_DS_BIOS_CHECKSUM = 0xBAAE1880;
@@ -6,15 +6,15 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_BIOS_H #define GBA_BIOS_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "arm/arm.h" -#include "core/log.h" +#include <mgba/core/log.h> mLOG_DECLARE_CATEGORY(GBA_BIOS); +struct ARMCore; void GBASwi16(struct ARMCore* cpu, int immediate); void GBASwi32(struct ARMCore* cpu, int immediate);
@@ -3,13 +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/. */ -#include "cheats.h" +#include <mgba/internal/gba/cheats.h> -#include "core/core.h" +#include <mgba/core/core.h> +#include <mgba/internal/gba/gba.h> +#include <mgba-util/string.h> #include "gba/cheats/gameshark.h" #include "gba/cheats/parv3.h" -#include "gba/gba.h" -#include "util/string.h" #define MAX_LINE_LENGTH 128
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_CHEATS_H #define GBA_CHEATS_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "arm/arm.h" -#include "core/cheats.h" +#include <mgba/internal/arm/arm.h> +#include <mgba/core/cheats.h> #define MAX_ROM_PATCHES 4 #define COMPLETE ((size_t) -1)
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "gba/cheats.h" +#include <mgba/internal/gba/cheats.h> -#include "gba/gba.h" -#include "gba/io.h" -#include "util/string.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> +#include <mgba-util/string.h> static void _cbLoadByteswap(uint8_t* buffer, uint32_t op1, uint16_t op2) { buffer[0] = op1 >> 24;
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "gameshark.h" +#include <mgba/internal/gba/cheats.h> #include "gba/cheats/parv3.h" -#include "gba/gba.h" -#include "util/string.h" +#include <mgba/internal/gba/gba.h> +#include <mgba-util/string.h> const uint32_t GBACheatGameSharkSeeds[4] = { 0x09F4FBBD, 0x9681884A, 0x352027E9, 0xF3DEE5A7 };
@@ -6,14 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_CHEATS_GAMESHARK_H #define GBA_CHEATS_GAMESHARK_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "gba/cheats.h" - extern const uint32_t GBACheatGameSharkSeeds[4]; +struct GBACheatSet; void GBACheatDecryptGameShark(uint32_t* op1, uint32_t* op2, const uint32_t* seeds); void GBACheatReseedGameShark(uint32_t* seeds, uint16_t params, const uint8_t* t1, const uint8_t* t2); void GBACheatSetGameSharkVersion(struct GBACheatSet* cheats, int version);
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "parv3.h" +#include <mgba/internal/gba/cheats.h> #include "gba/cheats/gameshark.h" -#include "gba/gba.h" -#include "util/string.h" +#include <mgba/internal/gba/gba.h> +#include <mgba-util/string.h> const uint32_t GBACheatProActionReplaySeeds[4] = { 0x7AA9648F, 0x7FAE6994, 0xC0EFAAD5, 0x42712C57 };
@@ -6,14 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_CHEATS_PARV3_H #define GBA_CHEATS_PARV3_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "gba/cheats.h" - extern const uint32_t GBACheatProActionReplaySeeds[4]; +struct GBACheatSet; bool GBACheatAddProActionReplayRaw(struct GBACheatSet* cheats, uint32_t op1, uint32_t op2); int GBACheatProActionReplayProbability(uint32_t op1, uint32_t op2);
@@ -3,24 +3,24 @@ *
* 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/. */ -#include "core.h" +#include <mgba/gba/core.h> -#include "core/core.h" -#include "core/log.h" -#include "arm/debugger/debugger.h" -#include "gba/cheats.h" -#include "gba/gba.h" -#include "gba/extra/cli.h" -#include "gba/overrides.h" +#include <mgba/core/core.h> +#include <mgba/core/log.h> +#include <mgba/internal/arm/debugger/debugger.h> +#include <mgba/internal/gba/cheats.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/extra/cli.h> +#include <mgba/internal/gba/overrides.h> #ifndef DISABLE_THREADING -#include "gba/renderers/thread-proxy.h" +#include <mgba/internal/gba/renderers/thread-proxy.h> #endif -#include "gba/renderers/video-software.h" -#include "gba/savedata.h" -#include "gba/serialize.h" -#include "util/memory.h" -#include "util/patch.h" -#include "util/vfs.h" +#include <mgba/internal/gba/renderers/video-software.h> +#include <mgba/internal/gba/savedata.h> +#include <mgba/internal/gba/serialize.h> +#include <mgba-util/memory.h> +#include <mgba-util/patch.h> +#include <mgba-util/vfs.h> struct GBACore { struct mCore d;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_CORE_H #define GBA_CORE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "dma.h" +#include <mgba/internal/gba/dma.h> -#include "gba/gba.h" -#include "gba/io.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> static void _dmaEvent(struct mTiming* timing, void* context, uint32_t cyclesLate);
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_DMA_H #define GBA_DMA_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,12 +3,14 @@ *
* 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/. */ -#include "cli.h" +#include <mgba/internal/gba/extra/cli.h> -#include "arm/debugger/cli-debugger.h" -#include "core/serialize.h" -#include "gba/io.h" -#include "gba/serialize.h" +#include <mgba/core/core.h> +#include <mgba/core/serialize.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> +#include <mgba/internal/gba/video.h> +#include <mgba/internal/arm/debugger/cli-debugger.h> static void _GBACLIDebuggerInit(struct CLIDebuggerSystem*); static bool _GBACLIDebuggerCustom(struct CLIDebuggerSystem*);
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_CLI_H #define GBA_CLI_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "debugger/cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> struct mCore;
@@ -3,29 +3,23 @@ *
* 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/. */ -#include "gba.h" +#include <mgba/internal/gba/gba.h> -#include "core/thread.h" +#include <mgba/internal/arm/isa-inlines.h> +#include <mgba/internal/arm/debugger/debugger.h> +#include <mgba/internal/arm/decoder.h> -#include "arm/decoder.h" -#include "arm/debugger/debugger.h" -#include "arm/isa-inlines.h" - -#include "gba/bios.h" -#include "gba/cheats.h" -#include "gba/io.h" -#include "gba/overrides.h" -#include "gba/rr/rr.h" -#include "gba/serialize.h" -#include "gba/sio.h" -#include "gba/timer.h" -#include "gba/vfame.h" +#include <mgba/internal/gba/bios.h> +#include <mgba/internal/gba/cheats.h> +#include <mgba/internal/gba/io.h> +#include <mgba/internal/gba/overrides.h> +#include <mgba/internal/gba/rr/rr.h> -#include "util/crc32.h" -#include "util/memory.h" -#include "util/math.h" -#include "util/patch.h" -#include "util/vfs.h" +#include <mgba-util/patch.h> +#include <mgba-util/crc32.h> +#include <mgba-util/math.h> +#include <mgba-util/memory.h> +#include <mgba-util/vfs.h> mLOG_DEFINE_CATEGORY(GBA, "GBA"); mLOG_DEFINE_CATEGORY(GBA_DEBUG, "GBA Debug");
@@ -6,20 +6,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_H #define GBA_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "arm/arm.h" -#include "core/log.h" -#include "core/timing.h" +#include <mgba/core/log.h> +#include <mgba/core/timing.h> -#include "gba/interface.h" -#include "gba/memory.h" -#include "gba/video.h" -#include "gba/audio.h" -#include "gba/sio.h" -#include "gba/timer.h" +#include <mgba/internal/gba/memory.h> +#include <mgba/internal/gba/video.h> +#include <mgba/internal/gba/audio.h> +#include <mgba/internal/gba/sio.h> +#include <mgba/internal/gba/timer.h> #define GBA_ARM7TDMI_FREQUENCY 0x1000000U@@ -52,6 +50,7 @@ SP_BASE_IRQ = 0x03007FA0,
SP_BASE_SUPERVISOR = 0x03007FE0 }; +struct ARMCore; struct GBA; struct Patch; struct VFile;
@@ -3,12 +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/. */ -#include "hardware.h" +#include <mgba/internal/gba/hardware.h> -#include "gba/io.h" -#include "gba/serialize.h" -#include "util/formatting.h" -#include "util/hash.h" +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/io.h> +#include <mgba/internal/gba/serialize.h> +#include <mgba-util/formatting.h> +#include <mgba-util/hash.h> mLOG_DEFINE_CATEGORY(GBA_HW, "GBA Pak Hardware");
@@ -6,14 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_HARDWARE_H #define GBA_HARDWARE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "arm/macros.h" -#include "core/log.h" -#include "core/timing.h" -#include "gba/interface.h" +#include <mgba/core/log.h> +#include <mgba/core/timing.h> +#include <mgba/gba/interface.h> #include <time.h>
@@ -1,6 +1,6 @@
#include "hle-bios.h" -#include "gba/memory.h" +#include <mgba/internal/gba/memory.h> const uint8_t hleBios[SIZE_BIOS] = { 0x06, 0x00, 0x00, 0xea, 0xfe, 0xff, 0xff, 0xea, 0x0b, 0x00, 0x00, 0xea,
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef HLE_BIOS_H #define HLE_BIOS_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -13,6 +13,6 @@
hle-bios.c: hle-bios.bin echo '#include "hle-bios.h"' > $@ echo >> $@ - echo '#include "gba/memory.h"' >> $@ + echo '#include <mgba/internal/gba/memory.h>' >> $@ echo >> $@ xxd -i $< | sed -e 's/unsigned char hle_bios_bin\[\]/const uint8_t hleBios[SIZE_BIOS]/' | grep -v hle_bios_bin_len >> $@
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "input.h" +#include <mgba/internal/gba/input.h> -#include "gba/interface.h" +#include <mgba/gba/interface.h> const struct mInputPlatformInfo GBAInputInfo = { .platformName = "gba",
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_INPUT_H #define GBA_INPUT_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/input.h" +#include <mgba/core/input.h> extern const struct mInputPlatformInfo GBAInputInfo;
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_INTERFACE_H #define GBA_INTERFACE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/interface.h" +#include <mgba/core/interface.h> enum GBASIOMode { SIO_NORMAL_8 = 0,
@@ -3,13 +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/. */ -#include "io.h" +#include <mgba/internal/gba/io.h> -#include "gba/dma.h" -#include "gba/rr/rr.h" -#include "gba/serialize.h" -#include "gba/sio.h" -#include "gba/video.h" +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/dma.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/rr/rr.h> +#include <mgba/internal/gba/serialize.h> mLOG_DEFINE_CATEGORY(GBA_IO, "GBA I/O");
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_IO_H #define GBA_IO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "gba/gba.h" +#include <mgba/core/log.h> enum GBAIORegisters { // Video@@ -163,6 +163,7 @@ mLOG_DECLARE_CATEGORY(GBA_IO);
extern const char* const GBAIORegisterNames[]; +struct GBA; void GBAIOInit(struct GBA* gba); void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value); void GBAIOWrite8(struct GBA* gba, uint32_t address, uint8_t value);
@@ -3,17 +3,19 @@ *
* 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/. */ -#include "memory.h" +#include <mgba/internal/gba/memory.h> -#include "arm/decoder.h" -#include "gba/dma.h" -#include "gba/hardware.h" -#include "gba/io.h" -#include "gba/serialize.h" +#include <mgba/internal/arm/decoder.h> +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/dma.h> +#include <mgba/internal/gba/io.h> +#include <mgba/internal/gba/serialize.h> #include "gba/hle-bios.h" -#include "util/math.h" -#include "util/memory.h" -#include "util/vfs.h" + +#include <mgba-util/math.h> +#include <mgba-util/memory.h> +#include <mgba-util/vfs.h> #define IDLE_LOOP_THRESHOLD 10000
@@ -6,16 +6,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_MEMORY_H #define GBA_MEMORY_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "arm/arm.h" -#include "core/timing.h" +#include <mgba/core/timing.h> -#include "gba/hardware.h" -#include "gba/savedata.h" -#include "gba/vfame.h" +#include <mgba/internal/arm/arm.h> +#include <mgba/internal/gba/hardware.h> +#include <mgba/internal/gba/savedata.h> +#include <mgba/internal/gba/vfame.h> enum GBAMemoryRegion { REGION_BIOS = 0x0,@@ -148,6 +148,7 @@
bool mirroring; }; +struct GBA; void GBAMemoryInit(struct GBA* gba); void GBAMemoryDeinit(struct GBA* gba);
@@ -3,12 +3,12 @@ *
* 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/. */ -#include "overrides.h" +#include <mgba/internal/gba/overrides.h> -#include "gba/gba.h" -#include "gba/hardware.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/hardware.h> -#include "util/configuration.h" +#include <mgba-util/configuration.h> static const struct GBACartridgeOverride _overrides[] = { // Advance Wars
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_OVERRIDES_H #define GBA_OVERRIDES_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "gba/savedata.h" +#include <mgba/internal/gba/savedata.h> #define IDLE_LOOP_NONE 0xFFFFFFFF
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "software-private.h" +#include "gba/renderers/software-private.h" -#include "gba/gba.h" +#include <mgba/internal/gba/gba.h> #define MODE_2_COORD_OVERFLOW \ localX = x & (sizeAdjusted - 1); \
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "software-private.h" +#include "gba/renderers/software-private.h" -#include "gba/gba.h" +#include <mgba/internal/gba/gba.h> #define BACKGROUND_TEXT_SELECT_CHARACTER \ localX = tileX * 8 + inX; \
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "software-private.h" +#include "gba/renderers/software-private.h" #define SPRITE_NORMAL_LOOP(DEPTH, TYPE) \ SPRITE_YBASE_ ## DEPTH(inY); \
@@ -6,7 +6,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef SOFTWARE_PRIVATE_H #define SOFTWARE_PRIVATE_H -#include "video-software.h" +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/renderers/video-software.h> #ifdef NDEBUG #define VIDEO_CHECKS false
@@ -3,13 +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/. */ -#include "thread-proxy.h" +#include <mgba/internal/gba/renderers/thread-proxy.h> -#include "core/tile-cache.h" -#include "gba/io.h" -#include "gba/renderers/tile-cache.h" +#include <mgba/core/tile-cache.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> -#include "util/memory.h" +#include <mgba-util/memory.h> #ifndef DISABLE_THREADING
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef VIDEO_THREAD_PROXY_H #define VIDEO_THREAD_PROXY_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "gba/video.h" -#include "util/threading.h" -#include "util/ring-fifo.h" +#include <mgba/internal/gba/video.h> +#include <mgba-util/threading.h> +#include <mgba-util/ring-fifo.h> enum GBAVideoThreadProxyState { PROXY_THREAD_STOPPED = 0,
@@ -3,11 +3,10 @@ *
* 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/. */ -#include "tile-cache.h" +#include <mgba/internal/gba/renderers/tile-cache.h> -#include "core/tile-cache.h" -#include "gba/video.h" -#include "gba/renderers/tile-cache.h" +#include <mgba/core/tile-cache.h> +#include <mgba/internal/gba/video.h> void GBAVideoTileCacheInit(struct mTileCache* cache) { mTileCacheInit(cache);
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_TILE_CACHE_H #define GBA_TILE_CACHE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,15 +3,14 @@ *
* 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/. */ -#include "software-private.h" +#include "gba/renderers/software-private.h" -#include "core/tile-cache.h" -#include "gba/gba.h" -#include "gba/io.h" -#include "gba/renderers/tile-cache.h" +#include <mgba/core/tile-cache.h> +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/io.h> -#include "util/arm-algo.h" -#include "util/memory.h" +#include <mgba-util/arm-algo.h> +#include <mgba-util/memory.h> static void GBAVideoSoftwareRendererInit(struct GBAVideoRenderer* renderer); static void GBAVideoSoftwareRendererDeinit(struct GBAVideoRenderer* renderer);
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef VIDEO_SOFTWARE_H #define VIDEO_SOFTWARE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/core.h" -#include "gba/video.h" +#include <mgba/core/core.h> +#include <mgba/internal/gba/video.h> struct GBAVideoSoftwareSprite { struct GBAObj obj;
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "mgm.h" +#include <mgba/internal/gba/rr/mgm.h> -#include "gba/gba.h" -#include "gba/serialize.h" -#include "util/vfs.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/serialize.h> +#include <mgba-util/vfs.h> #define BINARY_EXT ".mgm" #define BINARY_MAGIC "GBAb"
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef RR_MGM_H #define RR_MGM_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "gba/rr/rr.h" +#include <mgba/internal/gba/rr/rr.h> struct GBA; struct VDir;
@@ -3,10 +3,11 @@ *
* 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/. */ -#include "rr.h" +#include <mgba/internal/gba/rr/rr.h> -#include "core/serialize.h" -#include "util/vfs.h" +#include <mgba/core/log.h> +#include <mgba/core/serialize.h> +#include <mgba-util/vfs.h> mLOG_DEFINE_CATEGORY(GBA_RR, "GBA RR");
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_RR_H #define GBA_RR_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" -#include "gba/serialize.h" +#include <mgba/core/log.h> +#include <mgba/internal/gba/serialize.h> struct VFile;
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "vbm.h" +#include <mgba/internal/gba/rr/vbm.h> -#include "gba/gba.h" -#include "gba/serialize.h" -#include "util/vfs.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/serialize.h> +#include <mgba-util/vfs.h> #ifdef USE_ZLIB #include <zlib.h>
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_VBM_H #define GBA_VBM_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "gba/rr/rr.h" +#include <mgba/internal/gba/rr/rr.h> struct GBAVBMContext { struct GBARRContext d;
@@ -3,13 +3,14 @@ *
* 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/. */ -#include "savedata.h" +#include <mgba/internal/gba/savedata.h> -#include "gba/gba.h" -#include "gba/serialize.h" +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/serialize.h> -#include "util/memory.h" -#include "util/vfs.h" +#include <mgba-util/memory.h> +#include <mgba-util/vfs.h> #include <errno.h> #include <fcntl.h>
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_SAVEDATA_H #define GBA_SAVEDATA_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" +#include <mgba/core/log.h> mLOG_DECLARE_CATEGORY(GBA_SAVE);
@@ -3,17 +3,14 @@ *
* 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/. */ -#include "serialize.h" +#include <mgba/internal/gba/serialize.h> -#include "core/serialize.h" -#include "gba/audio.h" -#include "gba/cheats.h" -#include "gba/io.h" -#include "gba/rr/rr.h" -#include "gba/video.h" +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/io.h> +#include <mgba/internal/gba/rr/rr.h> -#include "util/memory.h" -#include "util/vfs.h" +#include <mgba-util/memory.h> +#include <mgba-util/vfs.h> #include <fcntl.h> #ifdef _MSC_VER
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_SERIALIZE_H #define GBA_SERIALIZE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/core.h" -#include "gba/gba.h" -#include "gb/serialize.h" +#include <mgba/core/core.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gb/serialize.h> extern const uint32_t GBA_SAVESTATE_MAGIC; extern const uint32_t GBA_SAVESTATE_VERSION;
@@ -3,10 +3,11 @@ *
* 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/. */ -#include "sharkport.h" +#include <mgba/internal/gba/sharkport.h> -#include "gba/gba.h" -#include "util/vfs.h" +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/gba.h> +#include <mgba-util/vfs.h> static const char* const SHARKPORT_HEADER = "SharkPortSave";
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_SHARKPORT_H #define GBA_SHARKPORT_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,9 +3,10 @@ *
* 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/. */ -#include "sio.h" +#include <mgba/internal/gba/sio.h> -#include "gba/io.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> mLOG_DEFINE_CATEGORY(GBA_SIO, "GBA Serial I/O");
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_SIO_H #define GBA_SIO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" -#include "gba/interface.h" +#include <mgba/gba/interface.h> +#include <mgba/core/log.h> #define MAX_GBAS 4
@@ -3,11 +3,10 @@ *
* 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/. */ -#include "lockstep.h" +#include <mgba/internal/gba/sio/lockstep.h> -#include "gba/gba.h" -#include "gba/io.h" -#include "gba/video.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> #define LOCKSTEP_INCREMENT 3000
@@ -6,13 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_SIO_LOCKSTEP_H #define GBA_SIO_LOCKSTEP_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/lockstep.h" -#include "core/timing.h" -#include "gba/sio.h" +#include <mgba/core/lockstep.h> +#include <mgba/core/timing.h> +#include <mgba/internal/gba/sio.h> struct GBASIOLockstep { struct mLockstep d;
@@ -5,8 +5,8 @@ * 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/. */ #include "util/test/suite.h" -#include "core/core.h" -#include "gba/core.h" +#include <mgba/core/core.h> +#include <mgba/gba/core.h> M_TEST_DEFINE(create) { struct mCore* core = GBACoreCreate();
@@ -5,7 +5,7 @@ * 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 TEST_GBA_H #define TEST_GBA_H -#include "util/common.h" +#include <mgba-util/common.h> int TestRunGBA(void);
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "timer.h" +#include <mgba/internal/gba/timer.h> -#include "gba/gba.h" -#include "gba/io.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> static void GBATimerUpdate(struct mTiming* timing, struct GBA* gba, int timerId, uint32_t cyclesLate) { struct GBATimer* timer = &gba->timers[timerId];
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_TIMER_H #define GBA_TIMER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/timing.h" +#include <mgba/core/timing.h> DECL_BITFIELD(GBATimerFlags, uint32_t); DECL_BITS(GBATimerFlags, PrescaleBits, 0, 4);
@@ -3,10 +3,10 @@ *
* 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/. */ +#include <mgba/internal/gba/vfame.h> -#include "vfame.h" -#include "gba/gba.h" -#include "gba/memory.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/memory.h> static const uint8_t ADDRESS_REORDERING[4][16] = { { 15, 14, 9, 1, 8, 10, 7, 3, 5, 11, 4, 0, 13, 12, 2, 6 },
@@ -9,7 +9,7 @@
#ifndef GBA_VFAME_H #define GBA_VFAME_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,18 +3,17 @@ *
* 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/. */ -#include "video.h" +#include <mgba/internal/gba/video.h> -#include "core/sync.h" -#include "core/tile-cache.h" -#include "gba/dma.h" -#include "gba/gba.h" -#include "gba/io.h" -#include "gba/renderers/tile-cache.h" -#include "gba/rr/rr.h" -#include "gba/serialize.h" +#include <mgba/core/sync.h> +#include <mgba/core/tile-cache.h> +#include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/dma.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/io.h> +#include <mgba/internal/gba/serialize.h> -#include "util/memory.h" +#include <mgba-util/memory.h> mLOG_DEFINE_CATEGORY(GBA_VIDEO, "GBA Video");
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GBA_VIDEO_H #define GBA_VIDEO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/timing.h" -#include "gba/memory.h" +#include <mgba/core/log.h> +#include <mgba/core/timing.h> mLOG_DECLARE_CATEGORY(GBA_VIDEO);
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "cli-debugger.h" +#include <mgba/internal/lr35902/debugger/cli-debugger.h> -#include "core/core.h" -#include "debugger/cli-debugger.h" -#include "lr35902/lr35902.h" +#include <mgba/core/core.h> +#include <mgba/internal/debugger/cli-debugger.h> +#include <mgba/internal/lr35902/lr35902.h> static void _printStatus(struct CLIDebuggerSystem*);
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef LR35902_CLI_DEBUGGER_H #define LR35902_CLI_DEBUGGER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "debugger.h" +#include <mgba/internal/lr35902/debugger/debugger.h> -#include "lr35902/lr35902.h" -#include "core/core.h" +#include <mgba/core/core.h> +#include <mgba/internal/lr35902/lr35902.h> DEFINE_VECTOR(LR35902DebugBreakpointList, struct LR35902DebugBreakpoint); DEFINE_VECTOR(LR35902DebugWatchpointList, struct LR35902DebugWatchpoint);
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef LR35902_DEBUGGER_H #define LR35902_DEBUGGER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "debugger/debugger.h" +#include <mgba/internal/debugger/debugger.h> struct LR35902DebugBreakpoint { uint16_t address;
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "isa-lr35902.h" +#include <mgba/internal/lr35902/isa-lr35902.h> -#include "lr35902/emitter-lr35902.h" -#include "lr35902/lr35902.h" +#include <mgba/internal/lr35902/emitter-lr35902.h> +#include <mgba/internal/lr35902/lr35902.h> static inline uint16_t LR35902ReadHL(struct LR35902Core* cpu) { uint16_t hl;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ISA_LR35902_H #define ISA_LR35902_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "lr35902.h" +#include <mgba/internal/lr35902/lr35902.h> -#include "isa-lr35902.h" +#include <mgba/internal/lr35902/isa-lr35902.h> void LR35902Init(struct LR35902Core* cpu) { cpu->master->init(cpu, cpu->master);
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef LR35902_H #define LR35902_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/cpu.h" -#include "lr35902/isa-lr35902.h" +#include <mgba/core/cpu.h> +#include <mgba/internal/lr35902/isa-lr35902.h> struct LR35902Core;
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "util/memory.h" +#include <mgba-util/memory.h> #include <3ds.h>
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "3ds-vfs.h" +#include <mgba-util/platform/3ds/3ds-vfs.h> #ifdef USE_VFS_3DS -#include "util/memory.h" -#include "util/string.h" +#include <mgba-util/memory.h> +#include <mgba-util/string.h> struct VFile3DS { struct VFile d;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef N3DS_VFS_H #define N3DS_VFS_H -#include "util/vfs.h" +#include <mgba-util/vfs.h> #include <3ds.h>
@@ -28,7 +28,7 @@ #include <3ds/services/fs.h>
#include <3ds/services/hid.h> #include <3ds/svc.h> -#include "util/common.h" +#include <mgba-util/common.h> extern char* fake_heap_start; extern char* fake_heap_end;
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "util/gui/font.h" -#include "util/gui/font-metrics.h" -#include "util/png-io.h" -#include "util/vfs.h" +#include <mgba-util/gui/font.h> +#include <mgba-util/gui/font-metrics.h> +#include <mgba-util/png-io.h> +#include <mgba-util/vfs.h> #include "icons.h" #include "ctr-gpu.h"
@@ -4,23 +4,24 @@ * 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/. */ -#include "core/core.h" +#include <mgba/core/blip_buf.h> +#include <mgba/core/core.h> #ifdef M_CORE_GBA -#include "gba/gba.h" -#include "gba/input.h" -#include "gba/video.h" +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/input.h> +#include <mgba/internal/gba/video.h> #endif #ifdef M_CORE_GB -#include "gb/gb.h" +#include <mgba/internal/gb/gb.h> #endif #include "feature/gui/gui-runner.h" -#include "util/gui.h" -#include "util/gui/file-select.h" -#include "util/gui/font.h" -#include "util/gui/menu.h" -#include "util/memory.h" +#include <mgba-util/gui.h> +#include <mgba-util/gui/file-select.h> +#include <mgba-util/gui/font.h> +#include <mgba-util/gui/menu.h> +#include <mgba-util/memory.h> -#include "3ds-vfs.h" +#include <mgba-util/platform/3ds/3ds-vfs.h> #include "ctr-gpu.h" #include <3ds.h>
@@ -3,6 +3,6 @@ *
* 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/. */ -#include "util/socket.h" +#include <mgba-util/socket.h> u32* SOCUBuffer = NULL;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef N3DS_THREADING_H #define N3DS_THREADING_H -#include "util/common.h" +#include <mgba-util/common.h> #include <3ds.h> #include <malloc.h>
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "core/core.h" -#include "core/version.h" -#include "util/socket.h" +#include <mgba/core/core.h> +#include <mgba/core/version.h> +#include <mgba-util/socket.h> #include <SDL.h>
@@ -1,7 +1,7 @@
// This source file is placed into the public domain. -#include "core/core.h" +#include <mgba/core/core.h> #include "feature/commandline.h" -#include "util/socket.h" +#include <mgba-util/socket.h> #define DEFAULT_PORT 13721
@@ -5,24 +5,24 @@ * 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/. */ #include "libretro.h" -#include "util/common.h" +#include <mgba-util/common.h> -#include "core/core.h" -#include "core/version.h" +#include <mgba/core/blip_buf.h> +#include <mgba/core/cheats.h> +#include <mgba/core/core.h> +#include <mgba/core/version.h> #ifdef M_CORE_GB -#include "gb/core.h" -#include "gb/gb.h" +#include <mgba/gb/core.h> #endif #ifdef M_CORE_GBA -#include "gba/bios.h" -#include "gba/core.h" -#include "gba/cheats.h" -#include "gba/core.h" -#include "gba/serialize.h" +#include <mgba/gba/core.h> +#include <mgba/gba/interface.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/video.h> #endif -#include "util/circle-buffer.h" -#include "util/memory.h" -#include "util/vfs.h" +#include <mgba-util/circle-buffer.h> +#include <mgba-util/memory.h> +#include <mgba-util/vfs.h> #define SAMPLES 1024 #define RUMBLE_PWM 35@@ -146,7 +146,7 @@ info->geometry.base_height = height;
info->geometry.max_width = width; info->geometry.max_height = height; info->geometry.aspect_ratio = width / (double) height; - info->timing.fps = GBA_ARM7TDMI_FREQUENCY / (float) VIDEO_TOTAL_LENGTH; + info->timing.fps = core->frequency(core) / (float) core->frameCycles(core); info->timing.sample_rate = 32768; }@@ -443,14 +443,14 @@ CircleBufferDeinit(&rumbleHistory);
} size_t retro_serialize_size(void) { - return sizeof(struct GBASerializedState); + return core->stateSize(core); } bool retro_serialize(void* data, size_t size) { if (size != retro_serialize_size()) { return false; } - GBASerialize(core->board, data); + core->saveState(core, data); return true; }@@ -458,7 +458,7 @@ bool retro_unserialize(const void* data, size_t size) {
if (size != retro_serialize_size()) { return false; } - GBADeserialize(core->board, data); + core->loadState(core, data); return true; }
@@ -24,17 +24,18 @@ */
#import "mGBAGameCore.h" -#include "util/common.h" +#include <mgba-util/common.h> -#include "core/serialize.h" -#include "core/core.h" -#include "gba/cheats.h" -#include "gba/core.h" -#include "gba/gba.h" -#include "gba/input.h" -#include "util/circle-buffer.h" -#include "util/memory.h" -#include "util/vfs.h" +#include <mgba/core/blip_buf.h> +#include <mgba/core/core.h> +#include <mgba/core/cheats.h> +#include <mgba/core/serialize.h> +#include <mgba/gba/core.h> +#include <mgba/internal/gba/cheats.h> +#include <mgba/internal/gba/input.h> +#include <mgba-util/circle-buffer.h> +#include <mgba-util/memory.h> +#include <mgba-util/vfs.h> #import <OpenEmuBase/OERingBuffer.h> #import "OEGBASystemResponderClient.h"@@ -129,8 +130,8 @@ }
- (void)setupEmulation { - blip_set_rates(core->getAudioChannel(core, 0), GBA_ARM7TDMI_FREQUENCY, 32768); - blip_set_rates(core->getAudioChannel(core, 1), GBA_ARM7TDMI_FREQUENCY, 32768); + blip_set_rates(core->getAudioChannel(core, 0), core->frequency(core), 32768); + blip_set_rates(core->getAudioChannel(core, 1), core->frequency(core), 32768); } #pragma mark - Video@@ -176,7 +177,7 @@ }
- (NSTimeInterval)frameInterval { - return GBA_ARM7TDMI_FREQUENCY / (double) VIDEO_TOTAL_LENGTH; + return core->frequency(core) / (double) core->frameCycles(core); } #pragma mark - Audio
@@ -5,7 +5,7 @@ * 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/. */ #include "gl.h" -#include "util/math.h" +#include <mgba-util/math.h> static const GLint _glVertices[] = { 0, 0,
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GL_H #define GL_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -5,11 +5,11 @@ * 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/. */ #include "gles2.h" -#include "core/log.h" -#include "util/configuration.h" -#include "util/formatting.h" -#include "util/vector.h" -#include "util/vfs.h" +#include <mgba/core/log.h> +#include <mgba-util/configuration.h> +#include <mgba-util/formatting.h> +#include <mgba-util/vector.h> +#include <mgba-util/vfs.h> mLOG_DECLARE_CATEGORY(OPENGL); mLOG_DEFINE_CATEGORY(OPENGL, "OpenGL");
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GLES2_H #define GLES2_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "util/memory.h" +#include <mgba-util/memory.h> #include <sys/mman.h>
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef POSIX_THREADING_H #define POSIX_THREADING_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "util/gui/font.h" -#include "util/gui/font-metrics.h" -#include "util/string.h" +#include <mgba-util/gui/font.h> +#include <mgba-util/gui/font-metrics.h> +#include <mgba-util/string.h> #include <vita2d.h>
@@ -5,12 +5,12 @@ * 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/. */ #include "psp2-context.h" -#include "gba/gba.h" +#include <mgba/internal/gba/gba.h> #include "feature/gui/gui-runner.h" -#include "util/gui.h" -#include "util/gui/font.h" -#include "util/gui/file-select.h" -#include "util/gui/menu.h" +#include <mgba-util/gui.h> +#include <mgba-util/gui/font.h> +#include <mgba-util/gui/file-select.h> +#include <mgba-util/gui/menu.h> #include <psp2/ctrl.h> #include <psp2/display.h>
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef PSP2_COMMON_H #define PSP2_COMMON_H -#include "util/common.h" +#include <mgba-util/common.h> #define PSP2_HORIZONTAL_PIXELS 960 #define PSP2_VERTICAL_PIXELS 544
@@ -5,25 +5,25 @@ * 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/. */ #include "psp2-context.h" -#include "core/core.h" +#include <mgba/core/blip_buf.h> +#include <mgba/core/core.h> #ifdef M_CORE_GBA -#include "gba/gba.h" +#include <mgba/internal/gba/gba.h> #endif #ifdef M_CORE_GB -#include "gb/gb.h" +#include <mgba/internal/gb/gb.h> #endif #include "feature/gui/gui-runner.h" -#include "gba/input.h" +#include <mgba/internal/gba/input.h> -#include "util/memory.h" -#include "util/circle-buffer.h" -#include "util/ring-fifo.h" -#include "util/threading.h" -#include "util/vfs.h" -#include "platform/psp2/sce-vfs.h" -#include "third-party/blip_buf/blip_buf.h" +#include <mgba-util/memory.h> +#include <mgba-util/circle-buffer.h> +#include <mgba-util/ring-fifo.h> +#include <mgba-util/threading.h> +#include <mgba-util/vfs.h> +#include <mgba-util/platform/psp2/sce-vfs.h> #include <psp2/audioout.h> #include <psp2/ctrl.h>
@@ -7,8 +7,8 @@ #ifndef PSP2_CONTEXT_H
#define PSP2_CONTEXT_H #include "psp2-common.h" -#include "core/interface.h" -#include "util/gui.h" +#include <mgba/core/interface.h> +#include <mgba-util/gui.h> struct mGUIRunner; void mPSP2Setup(struct mGUIRunner* runner);
@@ -3,8 +3,8 @@ *
* 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/. */ -#include "util/memory.h" -#include "util/vector.h" +#include <mgba-util/memory.h> +#include <mgba-util/vector.h> #include <psp2/kernel/sysmem.h> #include <psp2/types.h>
@@ -3,12 +3,12 @@ *
* 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/. */ -#include "sce-vfs.h" +#include <mgba-util/platform/psp2/sce-vfs.h> #include <psp2/io/dirent.h> -#include "util/vfs.h" -#include "util/memory.h" +#include <mgba-util/vfs.h> +#include <mgba-util/memory.h> struct VFileSce { struct VFile d;
@@ -27,23 +27,23 @@ #undef const
#include "flags.h" -#include "core/core.h" -#include "core/tile-cache.h" +#include <mgba/core/core.h> +#include <mgba/core/tile-cache.h> #include "platform/python/vfs-py.h" #include "platform/python/log.h" #ifdef USE_PNG -#include "util/png-io.h" +#include <mgba-util/png-io.h> #endif #ifdef M_CORE_GBA -#include "arm/arm.h" -#include "gba/gba.h" -#include "gba/input.h" -#include "gba/renderers/tile-cache.h" +#include <mgba/internal/arm/arm.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/input.h> +#include <mgba/internal/gba/renderers/tile-cache.h> #endif #ifdef M_CORE_GB -#include "lr35902/lr35902.h" -#include "gb/gb.h" -#include "gba/input.h" -#include "gb/renderers/tile-cache.h" +#include <mgba/internal/lr35902/lr35902.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gba/input.h> +#include <mgba/internal/gb/renderers/tile-cache.h> #endif
@@ -7,29 +7,30 @@
ffi = cffi.FFI() pydir = os.path.dirname(os.path.abspath(__file__)) srcdir = os.path.join(pydir, "..", "..") +incdir = os.path.join(pydir, "..", "..", "..", "include") bindir = os.environ.get("BINDIR", os.path.join(os.getcwd(), "..")) cpp = shlex.split(os.environ.get("CPP", "cc -E")) cppflags = shlex.split(os.environ.get("CPPFLAGS", "")) if __name__ == "__main__": cppflags.extend(sys.argv[1:]) -cppflags.extend(["-I" + srcdir, "-I" + bindir]) +cppflags.extend(["-I" + incdir, "-I" + srcdir, "-I" + bindir]) ffi.set_source("mgba._pylib", """ #include "flags.h" -#include "util/common.h" -#include "core/core.h" -#include "core/log.h" -#include "core/tile-cache.h" -#include "arm/arm.h" -#include "gba/gba.h" -#include "gba/input.h" -#include "gba/renderers/tile-cache.h" -#include "lr35902/lr35902.h" -#include "gb/gb.h" -#include "gb/renderers/tile-cache.h" -#include "util/png-io.h" -#include "util/vfs.h" +#include <mgba-util/common.h> +#include <mgba/core/core.h> +#include <mgba/core/log.h> +#include <mgba/core/tile-cache.h> +#include <mgba/internal/arm/arm.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/input.h> +#include <mgba/internal/gba/renderers/tile-cache.h> +#include <mgba/internal/lr35902/lr35902.h> +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/renderers/tile-cache.h> +#include <mgba-util/png-io.h> +#include <mgba-util/vfs.h> struct VFile* VFileFromPython(void* fileobj);@@ -44,7 +45,7 @@ struct mLoggerPy {
struct mLogger d; void* pyobj; }; -""", include_dirs=[srcdir], +""", include_dirs=[incdir, srcdir], extra_compile_args=cppflags, libraries=["mgba"], library_dirs=[bindir],
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "core/log.h" +#include <mgba/core/log.h> struct mLoggerPy { struct mLogger d;@@ -24,4 +24,4 @@ struct mLoggerPy* logger = malloc(sizeof(*logger));
logger->d.log = _pyLogShim; logger->pyobj = pyobj; return &logger->d; -}+}
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "core/log.h" +#include <mgba/core/log.h> struct mLoggerPy { struct mLogger d;
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "util/vfs.h" +#include <mgba-util/vfs.h> struct VFilePy { struct VFile d;
@@ -4,7 +4,7 @@ * 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/. */ -#include "util/vfs.h" +#include <mgba-util/vfs.h> struct VFilePy { struct VFile d;@@ -25,4 +25,4 @@ void _vfpTruncate(struct VFile* vf, size_t size);
ssize_t _vfpSize(struct VFile* vf); bool _vfpSync(struct VFile* vf, const void* buffer, size_t size); -}+}
@@ -5,7 +5,7 @@ * 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/. */ #include "AboutScreen.h" -#include "core/version.h" +#include <mgba/core/version.h> #include <QFile> #include <QPixmap>
@@ -5,7 +5,7 @@ * 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/. */ #include "ArchiveInspector.h" -#include "util/vfs.h" +#include <mgba-util/vfs.h> using namespace QGBA;
@@ -9,12 +9,12 @@ #include "GBAApp.h"
#include <QFontDatabase> -#include "core/interface.h" +#include <mgba/core/interface.h> #ifdef M_CORE_GBA -#include "gba/memory.h" +#include <mgba/internal/gba/memory.h> #endif #ifdef M_CORE_GB -#include "gb/memory.h" +#include <mgba/internal/gb/memory.h> #endif using namespace QGBA;
@@ -10,7 +10,7 @@ #include "GameController.h"
#include "ui_AssetTile.h" -#include "core/tile-cache.h" +#include <mgba/core/tile-cache.h> namespace QGBA {
@@ -7,10 +7,6 @@ #include "AssetView.h"
#include <QTimer> -#ifdef M_CORE_GBA -#include "gba/gba.h" -#endif - using namespace QGBA; AssetView::AssetView(GameController* controller, QWidget* parent)
@@ -7,9 +7,10 @@ #include "AudioDevice.h"
#include "LogController.h" -#include "core/core.h" -#include "core/thread.h" -#include "gba/audio.h" +#include <mgba/core/blip_buf.h> +#include <mgba/core/core.h> +#include <mgba/core/thread.h> +#include <mgba/internal/gba/audio.h> using namespace QGBA;
@@ -10,8 +10,8 @@ #include "LogController.h"
#include <QAudioOutput> -#include "core/core.h" -#include "core/thread.h" +#include <mgba/core/core.h> +#include <mgba/core/thread.h> using namespace QGBA;
@@ -7,7 +7,7 @@ #include "AudioProcessorSDL.h"
#include "LogController.h" -#include "core/thread.h" +#include <mgba/core/thread.h> using namespace QGBA;
@@ -10,7 +10,8 @@ #include "VFileDevice.h"
#include <QSet> -#include "core/cheats.h" +#include <mgba/core/cheats.h> +#include <mgba-util/vfs.h> using namespace QGBA;
@@ -11,12 +11,12 @@
#include <QClipboard> #include <QPushButton> -#include "core/cheats.h" +#include <mgba/core/cheats.h> #ifdef M_CORE_GBA -#include "gba/cheats.h" +#include <mgba/internal/gba/cheats.h> #endif #ifdef M_CORE_GB -#include "gb/cheats.h" +#include <mgba/internal/gb/cheats.h> #endif using namespace QGBA;
@@ -15,8 +15,8 @@ #include <QVariant>
#include <functional> -#include "core/config.h" -#include "util/configuration.h" +#include <mgba/core/config.h> +#include <mgba-util/configuration.h> #include "feature/commandline.h" class QAction;
@@ -9,7 +9,7 @@ #include "GameController.h"
#include <QMutexLocker> -#include "debugger/cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> using namespace QGBA;
@@ -12,7 +12,7 @@ #include <QMutex>
#include <QStringList> #include <QWaitCondition> -#include "debugger/cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> namespace QGBA {
@@ -9,9 +9,9 @@ #include "DisplayGL.h"
#include "DisplayQt.h" #ifdef M_CORE_GB -#include "gb/video.h" +#include <mgba/internal/gb/video.h> #elif defined(M_CORE_GBA) -#include "gba/video.h" +#include <mgba/internal/gba/video.h> #endif using namespace QGBA;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef QGBA_DISPLAY #define QGBA_DISPLAY -#include "util/common.h" +#include <mgba-util/common.h> #include <QWidget>
@@ -8,8 +8,8 @@
#include <QApplication> #include <QResizeEvent> -#include "core/core.h" -#include "core/thread.h" +#include <mgba/core/core.h> +#include <mgba/core/thread.h> #ifdef BUILD_GL #include "platform/opengl/gl.h" #endif
@@ -7,8 +7,8 @@ #include "DisplayQt.h"
#include <QPainter> -#include "core/core.h" -#include "core/thread.h" +#include <mgba/core/core.h> +#include <mgba/core/thread.h> using namespace QGBA;
@@ -16,11 +16,14 @@ #include <QFileOpenEvent>
#include <QIcon> #include <QTranslator> -#include "core/version.h" +#include <mgba/core/version.h> +#include <mgba/internal/gba/video.h> +#include <mgba-util/socket.h> +#include <mgba-util/nointro.h> +#include <mgba-util/vfs.h> +/* #include "feature/commandline.h" -#include "util/nointro.h" -#include "util/socket.h" - +*/ using namespace QGBA; static GBAApp* g_app = nullptr;
@@ -14,8 +14,7 @@ #include "MultiplayerController.h"
struct NoIntroDB; -#include "core/log.h" -#include "gba/sio.h" +#include <mgba/core/log.h> mLOG_DECLARE_CATEGORY(QT);
@@ -11,7 +11,7 @@ #include <QPicture>
#include <QSet> #include <QWidget> -#include "gba/input.h" +#include <mgba/internal/gba/input.h> class QComboBox; class QTimer;
@@ -5,7 +5,7 @@ * 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/. */ #include "GBAOverride.h" -#include "core/core.h" +#include <mgba/core/core.h> using namespace QGBA;
@@ -8,7 +8,7 @@ #define QGBA_GBA_OVERRIDE
#include "Override.h" -#include "gba/overrides.h" +#include <mgba/internal/gba/overrides.h> namespace QGBA {
@@ -5,9 +5,9 @@ * 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/. */ #include "GBOverride.h" -#include "core/core.h" -#include "gb/gb.h" -#include "util/crc32.h" +#include <mgba/core/core.h> +#include <mgba/internal/gb/gb.h> +#include <mgba-util/crc32.h> using namespace QGBA;
@@ -8,7 +8,7 @@ #define QGBA_GB_OVERRIDE
#include "Override.h" -#include "gb/overrides.h" +#include <mgba/internal/gb/overrides.h> namespace QGBA {
@@ -10,7 +10,7 @@ #include "DebuggerController.h"
#ifdef USE_GDB_STUB -#include "debugger/gdb-stub.h" +#include <mgba/internal/debugger/gdb-stub.h> namespace QGBA {
@@ -12,6 +12,9 @@ #include "LogController.h"
#include <QMap> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/video.h> + using namespace QGBA; GIFView::GIFView(QWidget* parent)
@@ -17,22 +17,23 @@ #include <QThread>
#include <ctime> -#include "core/config.h" -#include "core/directories.h" -#include "core/serialize.h" -#include "core/tile-cache.h" +#include <mgba/core/config.h> +#include <mgba/core/directories.h> +#include <mgba/core/serialize.h> +#include <mgba/core/tile-cache.h> #ifdef M_CORE_GBA -#include "gba/bios.h" -#include "gba/core.h" -#include "gba/gba.h" -#include "gba/renderers/tile-cache.h" -#include "gba/sharkport.h" +#include <mgba/gba/interface.h> +#include <mgba/internal/gba/bios.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/gba/core.h> +#include <mgba/internal/gba/renderers/tile-cache.h> +#include <mgba/internal/gba/sharkport.h> #endif #ifdef M_CORE_GB -#include "gb/gb.h" -#include "gb/renderers/tile-cache.h" +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/renderers/tile-cache.h> #endif -#include "util/vfs.h" +#include <mgba-util/vfs.h> using namespace QGBA; using namespace std;
@@ -15,12 +15,10 @@ #include <QTimer>
#include <memory> -#include "core/core.h" -#include "core/thread.h" -#include "gba/cheats.h" -#include "gba/hardware.h" -#include "gba/input.h" -#include "gba/overrides.h" +#include <mgba/core/core.h> +#include <mgba/core/thread.h> +#include <mgba/gba/interface.h> +#include <mgba/internal/gba/input.h> #ifdef BUILD_SDL #include "platform/sdl/sdl-events.h" #endif
@@ -8,7 +8,7 @@ #define QGBA_GAMEPAD_AXIS_EVENT
#include <QEvent> -#include "gba/input.h" +#include <mgba/internal/gba/input.h> namespace QGBA {
@@ -8,7 +8,7 @@ #define QGBA_GAMEPAD_BUTTON_EVENT
#include <QEvent> -#include "gba/input.h" +#include <mgba/internal/gba/input.h> namespace QGBA {
@@ -12,10 +12,12 @@ #include <QFontDatabase>
#include <QGridLayout> #include <QSpinBox> -#include "gba/io.h" +#include <mgba/internal/gba/io.h> +#include <mgba/internal/gba/memory.h> + +struct ARMCore; using namespace QGBA; - QList<IOViewer::RegisterDescription> IOViewer::s_registers;
@@ -14,8 +14,8 @@ #include <QApplication>
#include <QTimer> #include <QWidget> -#include "core/interface.h" -#include "util/configuration.h" +#include <mgba/core/interface.h> +#include <mgba-util/configuration.h> using namespace QGBA;
@@ -14,7 +14,7 @@ #include <QVector>
class QTimer; -#include "gba/input.h" +#include <mgba/internal/gba/input.h> #ifdef BUILD_SDL #include "platform/sdl/sdl-events.h"
@@ -8,7 +8,7 @@ #define QGBA_INPUT_PROFILE
#include "GamepadAxisEvent.h" -#include "gba/interface.h" +#include <mgba/gba/interface.h> namespace QGBA {
@@ -5,7 +5,7 @@ * 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/. */ #include "LibraryModel.h" -#include "util/vfs.h" +#include <mgba-util/vfs.h> using namespace QGBA;
@@ -8,7 +8,7 @@ #define QGBA_LIBRARY_MODEL
#include <QAbstractItemModel> -#include "core/library.h" +#include <mgba/core/library.h> struct VDir;
@@ -14,11 +14,9 @@ #include <QDateTime>
#include <QKeyEvent> #include <QPainter> -#include "core/serialize.h" -#ifdef M_CORE_GBA -#include "gba/serialize.h" -#endif -#include "util/memory.h" +#include <mgba/core/serialize.h> +#include <mgba-util/memory.h> +#include <mgba-util/vfs.h> using namespace QGBA;
@@ -11,8 +11,6 @@
#include <QObject> #include <QStringList> -#include "gba/gba.h" - namespace QGBA { class LogController : public QObject {
@@ -19,7 +19,8 @@ #include <QScrollBar>
#include <QSlider> #include <QWheelEvent> -#include "core/core.h" +#include <mgba/core/core.h> +#include <mgba-util/vfs.h> using namespace QGBA;
@@ -13,7 +13,7 @@ #include <QStaticText>
#include <QVector> #include <memory> -#include "util/text-codec.h" +#include <mgba-util/text-codec.h> struct mCore;
@@ -8,12 +8,12 @@ #include "MemoryView.h"
#include "GameController.h" -#include "core/core.h" +#include <mgba/core/core.h> #ifdef M_CORE_GBA -#include "gba/memory.h" +#include <mgba/internal/gba/memory.h> #endif #ifdef M_CORE_GB -#include "gb/memory.h" +#include <mgba/internal/gb/memory.h> #endif using namespace QGBA;
@@ -9,7 +9,7 @@ #include <QPainter>
#include <QDebug> -#include "gba/video.h" +#include <mgba/internal/gba/video.h> using namespace QGBA;
@@ -8,10 +8,10 @@
#include "GameController.h" #ifdef M_CORE_GBA -#include "gba/gba.h" +#include <mgba/internal/gba/gba.h> #endif #ifdef M_CORE_GB -#include "gb/gb.h" +#include <mgba/internal/gb/gb.h> #endif using namespace QGBA;
@@ -10,12 +10,12 @@ #include <QMutex>
#include <QList> #include <QObject> -#include "core/lockstep.h" +#include <mgba/core/lockstep.h> #ifdef M_CORE_GBA -#include "gba/sio/lockstep.h" +#include <mgba/internal/gba/sio/lockstep.h> #endif #ifdef M_CORE_GB -#include "gb/sio/lockstep.h" +#include <mgba/internal/gb/sio/lockstep.h> #endif namespace QGBA {
@@ -10,10 +10,10 @@
#include <QFontDatabase> #include <QTimer> -#include "gba/gba.h" +#include <mgba/internal/gba/gba.h> #ifdef M_CORE_GB -#include "gb/gb.h" -#include "gb/io.h" +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/io.h> #endif using namespace QGBA;
@@ -11,7 +11,7 @@ #include "GameController.h"
#include "ui_ObjView.h" -#include "core/tile-cache.h" +#include <mgba/core/tile-cache.h> namespace QGBA {
@@ -12,12 +12,12 @@ #include "GameController.h"
#ifdef M_CORE_GBA #include "GBAOverride.h" -#include "gba/gba.h" +#include <mgba/internal/gba/gba.h> #endif #ifdef M_CORE_GB #include "GBOverride.h" -#include "gb/gb.h" +#include <mgba/internal/gb/gb.h> #endif using namespace QGBA;
@@ -9,7 +9,7 @@
#include <QDialog> #ifdef M_CORE_GB -#include "gb/overrides.h" +#include <mgba/gb/interface.h> #endif #include "ui_OverrideView.h"
@@ -12,15 +12,15 @@
#include <QFileDialog> #include <QFontDatabase> -#include "core/core.h" -#include "util/export.h" -#ifdef M_CORE_GA -#include "gba/gba.h" +#include <mgba/core/core.h> +#ifdef M_CORE_GBA +#include <mgba/internal/gba/gba.h> #endif #ifdef M_CORE_GB -#include "gb/gb.h" +#include <mgba/internal/gb/gb.h> #endif -#include "util/vfs.h" +#include <mgba-util/export.h> +#include <mgba-util/vfs.h> using namespace QGBA;
@@ -8,14 +8,14 @@
#include "GBAApp.h" #include "GameController.h" -#include "core/core.h" +#include <mgba/core/core.h> #ifdef M_CORE_GB -#include "gb/gb.h" +#include <mgba/internal/gb/gb.h> #endif #ifdef M_CORE_GBA -#include "gba/gba.h" +#include <mgba/internal/gba/gba.h> #endif -#include "util/nointro.h" +#include <mgba-util/nointro.h> using namespace QGBA;
@@ -9,8 +9,8 @@ #include "GameController.h"
#include "GamepadAxisEvent.h" #include "InputController.h" -#include "core/core.h" -#include "gba/gba.h" +#include <mgba/core/core.h> +#include <mgba/internal/gba/gba.h> using namespace QGBA;
@@ -13,8 +13,8 @@ #include "GBAKeyEditor.h"
#include "InputController.h" #include "ShortcutView.h" -#include "core/serialize.h" -#include "gba/gba.h" +#include <mgba/core/serialize.h> +#include <mgba/internal/gba/gba.h> using namespace QGBA;
@@ -17,7 +17,8 @@ #include <QFormLayout>
#include <QGridLayout> #include <QSpinBox> -#include "core/version.h" +#include <mgba/core/version.h> +#include <mgba-util/vfs.h> #include "platform/video-backend.h" #if !defined(_WIN32) || defined(USE_EPOXY)
@@ -8,7 +8,7 @@
#include <QMouseEvent> #include <QPainter> -#include "core/interface.h" +#include <mgba/core/interface.h> using namespace QGBA;
@@ -11,7 +11,7 @@ #include <QFontDatabase>
#include <QTimer> #ifdef M_CORE_GB -#include "gb/gb.h" +#include <mgba/internal/gb/gb.h> #endif using namespace QGBA;
@@ -11,7 +11,7 @@ #include "GameController.h"
#include "ui_TileView.h" -#include "core/tile-cache.h" +#include <mgba/core/tile-cache.h> namespace QGBA {
@@ -5,6 +5,8 @@ * 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/. */ #include "VFileDevice.h" +#include <mgba-util/vfs.h> + using namespace QGBA; VFileDevice::VFileDevice(VFile* vf, QObject* parent)
@@ -8,7 +8,8 @@ #define QGBA_VFILE_DEVICE
#include <QFileDevice> -#include "util/vfs.h" +struct VDir; +struct VFile; namespace QGBA {
@@ -12,10 +12,6 @@ #include "LogController.h"
#include <QMap> -#ifdef M_CORE_GB -#include "gb/video.h" -#endif - using namespace QGBA; QMap<QString, QString> VideoView::s_acodecMap;
@@ -42,13 +42,14 @@ #include "ShortcutController.h"
#include "TileView.h" #include "VideoView.h" -#include "core/version.h" +#include <mgba/core/version.h> #ifdef M_CORE_GB -#include "gb/gb.h" +#include <mgba/internal/gb/gb.h> +#include <mgba/internal/gb/video.h> #endif #include "feature/commandline.h" -#include "util/nointro.h" -#include "util/vfs.h" +#include <mgba-util/nointro.h> +#include <mgba-util/vfs.h> using namespace QGBA;
@@ -13,8 +13,7 @@ #include <QTimer>
#include <functional> -#include "core/thread.h" -#include "gba/gba.h" +#include <mgba/core/thread.h> #include "InputController.h" #include "LoadSaveState.h"
@@ -5,7 +5,7 @@ * 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/. */ #include "main.h" -#include "core/version.h" +#include <mgba/core/version.h> void mSDLGLCommonSwap(struct VideoBackend* context) { struct mSDLRenderer* renderer = (struct mSDLRenderer*) context->user;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef SDL_GL_COMMON_H #define SDL_GL_COMMON_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -7,8 +7,8 @@ #include "main.h"
#include "gl-common.h" -#include "core/core.h" -#include "core/thread.h" +#include <mgba/core/core.h> +#include <mgba/core/thread.h> #include "platform/opengl/gl.h" static void _doViewport(int w, int h, struct VideoBackend* v) {
@@ -5,33 +5,23 @@ * 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/. */ #include "main.h" -#include "debugger/cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> #ifdef USE_GDB_STUB -#include "debugger/gdb-stub.h" +#include <mgba/internal/debugger/gdb-stub.h> #endif #ifdef USE_EDITLINE #include "feature/editline/cli-el-backend.h" #endif -#include "core/core.h" -#include "core/config.h" -#include "core/input.h" -#include "core/thread.h" -#include "gba/input.h" -#ifdef M_CORE_GBA -#include "gba/core.h" -#include "gba/gba.h" -#include "gba/video.h" -#endif -#ifdef M_CORE_GB -#include "gb/core.h" -#include "gb/gb.h" -#include "gb/video.h" -#endif +#include <mgba/core/core.h> +#include <mgba/core/config.h> +#include <mgba/core/input.h> +#include <mgba/core/thread.h> +#include <mgba/internal/gba/input.h> + #include "feature/commandline.h" -#include "util/configuration.h" -#include "util/vfs.h" +#include <mgba-util/vfs.h> #include <SDL.h>
@@ -6,17 +6,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef SDL_MAIN_H #define SDL_MAIN_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START - -#ifdef M_CORE_GBA -#include "gba/renderers/video-software.h" -#endif - -#ifdef M_CORE_GB -#include "gb/renderers/software.h" -#endif #include "sdl-audio.h" #include "sdl-events.h"
@@ -5,11 +5,12 @@ * 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/. */ #include "sdl-audio.h" -#include "core/core.h" -#include "core/thread.h" -#include "gba/gba.h" +#include <mgba/core/core.h> +#include <mgba/core/thread.h> +#include <mgba/internal/gba/audio.h> +#include <mgba/internal/gba/gba.h> -#include "third-party/blip_buf/blip_buf.h" +#include <mgba/core/blip_buf.h> #define BUFFER_SIZE (GBA_AUDIO_SAMPLES >> 2)
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef SDL_AUDIO_H #define SDL_AUDIO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/log.h" +#include <mgba/core/log.h> #include <SDL.h>
@@ -5,18 +5,15 @@ * 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/. */ #include "sdl-events.h" -#include "core/input.h" -#include "core/serialize.h" -#include "core/thread.h" -#include "debugger/debugger.h" -#include "gba/input.h" -#include "gba/io.h" -#include "gba/rr/rr.h" -#include "gba/video.h" -#include "gba/renderers/video-software.h" -#include "util/configuration.h" -#include "util/formatting.h" -#include "util/vfs.h" +#include <mgba/core/core.h> +#include <mgba/core/input.h> +#include <mgba/core/serialize.h> +#include <mgba/core/thread.h> +#include <mgba/internal/debugger/debugger.h> +#include <mgba/internal/gba/input.h> +#include <mgba-util/configuration.h> +#include <mgba-util/formatting.h> +#include <mgba-util/vfs.h> #if SDL_VERSION_ATLEAST(2, 0, 0) && defined(__APPLE__) #define GUI_MOD KMOD_GUI
@@ -6,14 +6,14 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef SDL_EVENTS_H #define SDL_EVENTS_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/interface.h" -#include "core/log.h" -#include "util/circle-buffer.h" -#include "util/vector.h" +#include <mgba/core/interface.h> +#include <mgba/core/log.h> +#include <mgba-util/circle-buffer.h> +#include <mgba-util/vector.h> #include <SDL.h>
@@ -3,17 +3,19 @@ *
* 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/. */ -#include "core/cheats.h" -#include "core/config.h" -#include "core/core.h" -#include "core/serialize.h" -#include "gb/core.h" -#include "gba/gba.h" +#include <mgba/core/blip_buf.h> +#include <mgba/core/cheats.h> +#include <mgba/core/config.h> +#include <mgba/core/core.h> +#include <mgba/core/serialize.h> +#include <mgba/gb/core.h> +#include <mgba/gba/core.h> +#include <mgba/internal/gba/gba.h> #include "feature/commandline.h" -#include "util/memory.h" -#include "util/string.h" -#include "util/vfs.h" +#include <mgba-util/memory.h> +#include <mgba-util/string.h> +#include <mgba-util/vfs.h> #include <errno.h> #include <signal.h>
@@ -3,16 +3,18 @@ *
* 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/. */ -#include "core/config.h" -#include "core/serialize.h" -#include "gba/core.h" -#include "gba/gba.h" -#include "gba/renderers/video-software.h" +#include <mgba/core/blip_buf.h> +#include <mgba/core/cheats.h> +#include <mgba/core/config.h> +#include <mgba/core/core.h> +#include <mgba/core/serialize.h> +#include <mgba/gb/core.h> +#include <mgba/gba/core.h> #include "feature/commandline.h" -#include "util/socket.h" -#include "util/string.h" -#include "util/vfs.h" +#include <mgba-util/socket.h> +#include <mgba-util/string.h> +#include <mgba-util/vfs.h> #ifdef _3DS #include <3ds.h>
@@ -3,8 +3,8 @@ *
* 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/. */ -#include "util/text-codec.h" -#include "util/vfs.h" +#include <mgba-util/text-codec.h> +#include <mgba-util/vfs.h> int main(int argc, char** argv) { struct TextCodec codec;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef VIDEO_BACKEND_H #define VIDEO_BACKEND_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,8 +3,8 @@ *
* 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/. */ -#include "util/gui/font.h" -#include "util/gui/font-metrics.h" +#include <mgba-util/gui/font.h> +#include <mgba-util/gui/font-metrics.h> #include "icons.h" #include "font.h"
@@ -12,18 +12,19 @@ #include <malloc.h>
#include <unistd.h> #include <wiiuse/wpad.h> -#include "util/common.h" +#include <mgba-util/common.h> -#include "core/core.h" +#include <mgba/core/blip_buf.h> +#include <mgba/core/core.h> #include "feature/gui/gui-runner.h" -#include "gba/audio.h" -#include "gba/gba.h" -#include "gba/input.h" -#include "util/gui.h" -#include "util/gui/file-select.h" -#include "util/gui/font.h" -#include "util/gui/menu.h" -#include "util/vfs.h" +#include <mgba/internal/gba/audio.h> +#include <mgba/internal/gba/gba.h> +#include <mgba/internal/gba/input.h> +#include <mgba-util/gui.h> +#include <mgba-util/gui/file-select.h> +#include <mgba-util/gui/font.h> +#include <mgba-util/gui/menu.h> +#include <mgba-util/vfs.h> #define GCN1_INPUT 0x47434E31 #define GCN2_INPUT 0x47434E32
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "util/memory.h" +#include <mgba-util/memory.h> void* anonymousMemoryMap(size_t size) { return malloc(size);
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef WINDOWS_THREADING_H #define WINDOWS_THREADING_H -#include "util/common.h" +#include <mgba-util/common.h> #define _WIN32_WINNT 0x0600 #include <windows.h>
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "util/vfs.h" +#include <mgba-util/vfs.h> -#include "util/string.h" +#include <mgba-util/string.h> #include <strsafe.h> static bool _vdwClose(struct VDir* vd);
@@ -1,6 +1,6 @@
/* blip_buf 1.1.0. http://www.slack.net/~ant/ */ -#include "blip_buf.h" +#include <mgba/core/blip_buf.h> #include <assert.h> #include <limits.h>
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "circle-buffer.h" +#include <mgba-util/circle-buffer.h> #ifndef NDEBUG static int _checkIntegrity(struct CircleBuffer* buffer) {
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CIRCLE_BUFFER_H #define CIRCLE_BUFFER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "configuration.h" +#include <mgba-util/configuration.h> -#include "util/formatting.h" -#include "util/string.h" -#include "util/vfs.h" +#include <mgba-util/formatting.h> +#include <mgba-util/string.h> +#include <mgba-util/vfs.h> #include "third-party/inih/ini.h"
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CONFIGURATION_H #define CONFIGURATION_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "util/table.h" +#include <mgba-util/table.h> struct VFile;
@@ -40,9 +40,9 @@ *
* CRC32 code derived from work by Gary S. Brown. */ -#include "util/crc32.h" +#include <mgba-util/crc32.h> -#include "util/vfs.h" +#include <mgba-util/vfs.h> enum { BUFFER_SIZE = 1024
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef CRC32_H #define CRC32_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "export.h" +#include <mgba-util/export.h> -#include "gba/video.h" -#include "util/vfs.h" +#include <mgba/core/interface.h> +#include <mgba-util/vfs.h> bool exportPaletteRIFF(struct VFile* vf, size_t entries, const uint16_t* colors) { if (entries > 0xFFFF) {
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef EXPORT_H #define EXPORT_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "formatting.h" +#include <mgba-util/formatting.h> #include <float.h> #include <time.h>
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef FORMATTING_H #define FORMATTING_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "gui.h" +#include <mgba-util/gui.h> void GUIInit(struct GUIParams* params) { memset(params->inputHistory, 0, sizeof(params->inputHistory));
@@ -6,12 +6,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GUI_H #define GUI_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "core/input.h" -#include "util/vector.h" +// TODO: Fix layering violation +#include <mgba/core/input.h> +#include <mgba-util/vector.h> struct GUIFont;
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "file-select.h" +#include <mgba-util/gui/file-select.h> -#include "util/gui/font.h" -#include "util/gui/menu.h" -#include "util/vfs.h" +#include <mgba-util/gui/font.h> +#include <mgba-util/gui/menu.h> +#include <mgba-util/vfs.h> #include <stdlib.h>
@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GUI_FILE_CHOOSER_H #define GUI_FILE_CHOOSER_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "util/gui.h" +#include <mgba-util/gui.h> struct VFile;
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "util/gui/font.h" +#include <mgba-util/gui/font.h> const struct GUIFontGlyphMetric defaultFontMetrics[128] = { { 0, 0, { 0, 0, 0, 0 }}, // 0x00
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef DEFAULT_FONT_METRICS_H #define DEFAULT_FONT_METRICS_H -#include "util/gui/font.h" +#include <mgba-util/gui/font.h> extern struct GUIFontGlyphMetric defaultFontMetrics[]; extern struct GUIIconMetric defaultIconMetrics[];
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "util/gui/font.h" +#include <mgba-util/gui/font.h> -#include "util/string.h" +#include <mgba-util/string.h> unsigned GUIFontSpanWidth(const struct GUIFont* font, const char* text) { unsigned width = 0;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GUI_FONT_H #define GUI_FONT_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -1,7 +1,7 @@
// MurmurHash3 was written by Austin Appleby, and is placed in the public // domain. The author hereby disclaims copyright to this source code. -#include "hash.h" +#include <mgba-util/hash.h> #if defined(_MSC_VER)
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef HASH_H #define HASH_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef UTIL_MATH_H #define UTIL_MATH_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MEMORY_H #define MEMORY_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,12 +3,11 @@ *
* 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/. */ -#include "nointro.h" +#include <mgba-util/nointro.h> -#include "util/crc32.h" -#include "util/table.h" -#include "util/vector.h" -#include "util/vfs.h" +#include <mgba-util/table.h> +#include <mgba-util/vector.h> +#include <mgba-util/vfs.h> #define KEY_STACK_SIZE 8
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef NOINTRO_H #define NOINTRO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "patch-fast.h" +#include <mgba-util/patch/fast.h> DEFINE_VECTOR(PatchFastExtents, struct PatchFastExtent);
@@ -6,12 +6,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef PATCH_FAST_H #define PATCH_FAST_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "util/patch.h" -#include "util/vector.h" +#include <mgba-util/patch.h> +#include <mgba-util/vector.h> #define PATCH_FAST_EXTENT 256
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "util/patch-ips.h" +#include <mgba-util/patch/ips.h> -#include "util/patch.h" -#include "util/vfs.h" +#include <mgba-util/patch.h> +#include <mgba-util/vfs.h> static size_t _IPSOutputSize(struct Patch* patch, size_t inSize); static bool _IPSApplyPatch(struct Patch* patch, const void* in, size_t inSize, void* out, size_t outSize);
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef PATCH_IPS_H #define PATCH_IPS_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "util/patch-ips.h" +#include <mgba-util/patch/ips.h> -#include "util/crc32.h" -#include "util/patch.h" -#include "util/vfs.h" +#include <mgba-util/crc32.h> +#include <mgba-util/patch.h> +#include <mgba-util/vfs.h> enum { IN_CHECKSUM = -12,
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef PATCH_UPS_H #define PATCH_UPS_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "util/patch.h" +#include <mgba-util/patch.h> -#include "util/patch-ips.h" -#include "util/patch-ups.h" +#include <mgba-util/patch/ips.h> +#include <mgba-util/patch/ups.h> bool loadPatch(struct VFile* vf, struct Patch* patch) { patch->vf = vf;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef PATCH_H #define PATCH_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "util/png-io.h" +#include <mgba-util/png-io.h> #ifdef USE_PNG -#include "vfs.h" +#include <mgba-util/vfs.h> static void _pngWrite(png_structp png, png_bytep buffer, png_size_t size) { struct VFile* vf = png_get_io_ptr(png);
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef PNG_IO_H #define PNG_IO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "ring-fifo.h" +#include <mgba-util/ring-fifo.h> -#include "util/memory.h" +#include <mgba-util/memory.h> void RingFIFOInit(struct RingFIFO* buffer, size_t capacity) { buffer->data = anonymousMemoryMap(capacity);
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef RING_FIFO_H #define RING_FIFO_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef SOCKET_H #define SOCKET_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "util/string.h" +#include <mgba-util/string.h> #include <string.h>
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef UTIL_STRING_H #define UTIL_STRING_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,10 +3,10 @@ *
* 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/. */ -#include "table.h" +#include <mgba-util/table.h> -#include "util/hash.h" -#include "util/string.h" +#include <mgba-util/hash.h> +#include <mgba-util/string.h> #define LIST_INITIAL_SIZE 8 #define TABLE_INITIAL_SIZE 8
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef TABLE_H #define TABLE_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -5,7 +5,7 @@ * 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 SUITE_H #define SUITE_H -#include "util/common.h" +#include <mgba-util/common.h> #include <setjmp.h> #include <cmocka.h>
@@ -5,8 +5,8 @@ * 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/. */ #include "util/test/suite.h" -#include "util/text-codec.h" -#include "util/vfs.h" +#include <mgba-util/text-codec.h> +#include <mgba-util/vfs.h> M_TEST_DEFINE(emptyCodec) { struct VFile* vf = VFileMemChunk(NULL, 0);
@@ -5,7 +5,7 @@ * 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 TEST_UTIL_H #define TEST_UTIL_H -#include "util/common.h" +#include <mgba-util/common.h> int TestRunUtil(void);
@@ -5,7 +5,7 @@ * 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/. */ #include "util/test/suite.h" -#include "util/vfs.h" +#include <mgba-util/vfs.h> #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 M_TEST_DEFINE(openNullPathR) {
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "text-codec.h" +#include <mgba-util/text-codec.h> -#include "util/string.h" -#include "util/table.h" -#include "util/vfs.h" +#include <mgba-util/string.h> +#include <mgba-util/table.h> +#include <mgba-util/vfs.h> struct TextCodecNode { uint8_t* leaf;
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef TEXT_CODEC_H #define TEXT_CODEC_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -6,19 +6,19 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef THREADING_H #define THREADING_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START #ifndef DISABLE_THREADING #ifdef USE_PTHREADS -#include "platform/posix/threading.h" +#include <mgba-util/platform/posix/threading.h> #elif _WIN32 -#include "platform/windows/threading.h" +#include <mgba-util/platform/windows/threading.h> #elif PSP2 -#include "platform/psp2/threading.h" +#include <mgba-util/platform/psp2/threading.h> #elif _3DS -#include "platform/3ds/threading.h" +#include <mgba-util/platform/3ds/threading.h> #else #define DISABLE_THREADING #endif
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef VECTOR_H #define VECTOR_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
@@ -3,15 +3,15 @@ *
* 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/. */ -#include "vfs.h" +#include <mgba-util/vfs.h> -#include "util/string.h" +#include <mgba-util/string.h> #ifdef PSP2 -#include "platform/psp2/sce-vfs.h" +#include <mgba-util/platform/psp2/sce-vfs.h> #endif #ifdef _3DS -#include "platform/3ds/3ds-vfs.h" +#include <mgba-util/platform/3ds/3ds-vfs.h> #endif struct VFile* VFileOpen(const char* path, int flags) {
@@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef VFS_H #define VFS_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START@@ -84,7 +84,7 @@ #ifdef USE_LZMA
struct VDir* VDirOpen7z(const char* path, int flags); #endif -#if defined(WII) || defined(_3DS) +#if defined(__wii__) || defined(_3DS) struct VFile* VFileFOpen(const char* path, const char* mode); struct VFile* VFileFromFILE(FILE* file); struct VDir* VDeviceList(void);
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "util/vfs.h" +#include <mgba-util/vfs.h> #include <sys/iosupport.h>
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "util/vfs.h" +#include <mgba-util/vfs.h> -#include "util/string.h" +#include <mgba-util/string.h> #include <dirent.h> #include <sys/stat.h>
@@ -3,7 +3,7 @@ *
* 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/. */ -#include "util/vfs.h" +#include <mgba-util/vfs.h> #include <fcntl.h> #include <sys/stat.h>
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "util/vfs.h" +#include <mgba-util/vfs.h> -#include "util/memory.h" +#include <mgba-util/memory.h> #include <errno.h> #include <stdio.h>
@@ -3,11 +3,11 @@ *
* 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/. */ -#include "util/vfs.h" +#include <mgba-util/vfs.h> #ifdef USE_LZMA -#include "util/string.h" +#include <mgba-util/string.h> #include "third-party/lzma/7z.h" #include "third-party/lzma/7zAlloc.h"
@@ -3,8 +3,8 @@ *
* 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/. */ -#include "util/vfs.h" -#include "util/memory.h" +#include <mgba-util/vfs.h> +#include <mgba-util/memory.h> struct VFileMem { struct VFile d;
@@ -3,9 +3,9 @@ *
* 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/. */ -#include "util/vfs.h" +#include <mgba-util/vfs.h> -#include "util/string.h" +#include <mgba-util/string.h> #ifdef USE_LIBZIP #include <zip.h>@@ -41,7 +41,7 @@ #include <minizip/unzip.h>
#else #include "third-party/zlib/contrib/minizip/unzip.h" #endif -#include "util/memory.h" +#include <mgba-util/memory.h> struct VDirEntryZip { struct VDirEntry d;