all repos — mgba @ fa884d071ecaa3e05ff20b45a67bf9500dd3d6b6

mGBA Game Boy Advance Emulator

All: Migrate includes to separate directory
Jeffrey Pfau jeffrey@endrift.com
Fri, 30 Dec 2016 17:00:22 -0800
commit

fa884d071ecaa3e05ff20b45a67bf9500dd3d6b6

parent

6d898542c765f4efc4a094c5ebd3f3465c36f417

371 files changed, 1099 insertions(+), 1111 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -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()
M src/arm/arm.csrc/arm/arm.c

@@ -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);
M src/arm/arm.hinclude/mgba/internal/arm/arm.h

@@ -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,
M src/arm/debugger/cli-debugger.csrc/arm/debugger/cli-debugger.c

@@ -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*);
M src/arm/debugger/cli-debugger.hinclude/mgba/internal/arm/debugger/cli-debugger.h

@@ -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
M src/arm/debugger/debugger.csrc/arm/debugger/debugger.c

@@ -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);
M src/arm/debugger/debugger.hinclude/mgba/internal/arm/debugger/debugger.h

@@ -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;
M src/arm/debugger/memory-debugger.csrc/arm/debugger/memory-debugger.c

@@ -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>
M src/arm/debugger/memory-debugger.hinclude/mgba/internal/arm/debugger/memory-debugger.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
M src/arm/decoder-arm.csrc/arm/decoder-arm.c

@@ -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; \
M src/arm/decoder-thumb.csrc/arm/decoder-thumb.c

@@ -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) { \
M src/arm/decoder.csrc/arm/decoder.c

@@ -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) { \
M src/arm/decoder.hinclude/mgba/internal/arm/decoder.h

@@ -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
M src/arm/isa-arm.csrc/arm/isa-arm.c

@@ -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
M src/arm/isa-arm.hinclude/mgba/internal/arm/isa-arm.h

@@ -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
M src/arm/isa-thumb.csrc/arm/isa-thumb.c

@@ -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
M src/arm/isa-thumb.hinclude/mgba/internal/arm/isa-thumb.h

@@ -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
M src/arm/macros.hinclude/mgba/internal/arm/macros.h

@@ -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
M src/core/cheats.csrc/core/cheats.c

@@ -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
M src/core/cheats.hinclude/mgba/core/cheats.h

@@ -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
M src/core/config.csrc/core/config.c

@@ -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
M src/core/config.hinclude/mgba/core/config.h

@@ -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;
M src/core/core.csrc/core/core.c

@@ -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>
M src/core/core.hinclude/mgba/core/core.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 {
M src/core/cpu.hinclude/mgba/core/cpu.h

@@ -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
M src/core/directories.csrc/core/directories.c

@@ -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) {
M src/core/directories.hinclude/mgba/core/directories.h

@@ -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
M src/core/input.csrc/core/input.c

@@ -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>
M src/core/input.hinclude/mgba/core/input.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
M src/core/interface.csrc/core/interface.c

@@ -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) {
M src/core/interface.hinclude/mgba/core/interface.h

@@ -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
M src/core/library.csrc/core/library.c

@@ -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);
M src/core/library.hinclude/mgba/core/library.h

@@ -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;
M src/core/lockstep.csrc/core/lockstep.c

@@ -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;
M src/core/lockstep.hinclude/mgba/core/lockstep.h

@@ -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
M src/core/log.csrc/core/log.c

@@ -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
M src/core/log.hinclude/mgba/core/log.h

@@ -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
M src/core/rewind.csrc/core/rewind.c

@@ -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);
M src/core/rewind.hinclude/mgba/core/rewind.h

@@ -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);
M src/core/serialize.csrc/core/serialize.c

@@ -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
M src/core/serialize.hinclude/mgba/core/serialize.h

@@ -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
M src/core/sync.csrc/core/sync.c

@@ -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
M src/core/sync.hinclude/mgba/core/sync.h

@@ -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;
M src/core/test/core.csrc/core/test/core.c

@@ -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) {
M src/core/test/core.hsrc/core/test/core.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/. */ #ifndef TEST_M_CORE_H #define TEST_M_CORE_H -#include "util/common.h" +#include <mgba-util/common.h> int TestRunCore(void);
M src/core/thread.csrc/core/thread.c

@@ -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>
M src/core/thread.hinclude/mgba/core/thread.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;
M src/core/tile-cache.csrc/core/tile-cache.c

@@ -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
M src/core/tile-cache.hinclude/mgba/core/tile-cache.h

@@ -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
M src/core/timing.csrc/core/timing.c

@@ -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;
M src/core/timing.hinclude/mgba/core/timing.h

@@ -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
M src/core/version.c.insrc/core/version.c.in

@@ -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}";
M src/debugger/cli-debugger.csrc/debugger/cli-debugger.c

@@ -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>
M src/debugger/cli-debugger.hinclude/mgba/internal/debugger/cli-debugger.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;
M src/debugger/debugger.csrc/debugger/debugger.c

@@ -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;
M src/debugger/debugger.hinclude/mgba/internal/debugger/debugger.h

@@ -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);
M src/debugger/gdb-stub.csrc/debugger/gdb-stub.c

@@ -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>
M src/debugger/gdb-stub.hinclude/mgba/internal/debugger/gdb-stub.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
M src/debugger/parser.csrc/debugger/parser.c

@@ -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));
M src/debugger/parser.hinclude/mgba/internal/debugger/parser.h

@@ -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,
M src/feature/commandline.csrc/feature/commandline.c

@@ -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
M src/feature/commandline.hsrc/feature/commandline.h

@@ -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;
M src/feature/editline/cli-el-backend.csrc/feature/editline/cli-el-backend.c

@@ -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>
M src/feature/editline/cli-el-backend.hsrc/feature/editline/cli-el-backend.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>
M src/feature/ffmpeg/ffmpeg-encoder.csrc/feature/ffmpeg/ffmpeg-encoder.c

@@ -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>
M src/feature/ffmpeg/ffmpeg-encoder.hsrc/feature/ffmpeg/ffmpeg-encoder.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>
M src/feature/gui/gui-config.csrc/feature/gui/gui-config.c

@@ -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
M src/feature/gui/gui-config.hsrc/feature/gui/gui-config.h

@@ -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
M src/feature/gui/gui-runner.csrc/feature/gui/gui-runner.c

@@ -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>
M src/feature/gui/gui-runner.hsrc/feature/gui/gui-runner.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,
M src/feature/gui/remap.csrc/feature/gui/remap.c

@@ -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 = {
M src/feature/gui/remap.hsrc/feature/gui/remap.h

@@ -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
M src/feature/imagemagick/imagemagick-gif-encoder.csrc/feature/imagemagick/imagemagick-gif-encoder.c

@@ -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);
M src/feature/imagemagick/imagemagick-gif-encoder.hsrc/feature/imagemagick/imagemagick-gif-encoder.h

@@ -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
M src/gb/audio.csrc/gb/audio.c

@@ -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
M src/gb/audio.hinclude/mgba/internal/gb/audio.h

@@ -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;
M src/gb/cheats.csrc/gb/cheats.c

@@ -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);
M src/gb/cheats.hinclude/mgba/internal/gb/cheats.h

@@ -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,
M src/gb/core.csrc/gb/core.c

@@ -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;
M src/gb/core.hinclude/mgba/gb/core.h

@@ -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
M src/gb/extra/cli.csrc/gb/extra/cli.c

@@ -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*);
M src/gb/extra/cli.hinclude/mgba/internal/gb/extra/cli.h

@@ -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;
M src/gb/gb.csrc/gb/gb.c

@@ -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
M src/gb/gb.hinclude/mgba/internal/gb/gb.h

@@ -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;
M src/gb/interface.hinclude/mgba/gb/interface.h

@@ -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
M src/gb/io.csrc/gb/io.c

@@ -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");
M src/gb/io.hinclude/mgba/internal/gb/io.h

@@ -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);
M src/gb/mbc.csrc/gb/mbc.c

@@ -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");
M src/gb/mbc.hinclude/mgba/internal/gb/mbc.h

@@ -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);
M src/gb/memory.csrc/gb/memory.c

@@ -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");
M src/gb/memory.hinclude/mgba/internal/gb/memory.h

@@ -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);
M src/gb/overrides.csrc/gb/overrides.c

@@ -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
M src/gb/overrides.hinclude/mgba/internal/gb/overrides.h

@@ -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;
M src/gb/renderers/software.csrc/gb/renderers/software.c

@@ -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);
M src/gb/renderers/software.hinclude/mgba/internal/gb/renderers/software.h

@@ -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;
M src/gb/renderers/tile-cache.csrc/gb/renderers/tile-cache.c

@@ -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);
M src/gb/renderers/tile-cache.hinclude/mgba/internal/gb/renderers/tile-cache.h

@@ -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
M src/gb/serialize.csrc/gb/serialize.c

@@ -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");
M src/gb/serialize.hinclude/mgba/internal/gb/serialize.h

@@ -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;
M src/gb/sio.csrc/gb/sio.c

@@ -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");
M src/gb/sio.hinclude/mgba/internal/gb/sio.h

@@ -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
M src/gb/sio/lockstep.csrc/gb/sio/lockstep.c

@@ -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
M src/gb/sio/lockstep.hinclude/mgba/internal/gb/sio/lockstep.h

@@ -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;
M src/gb/test/core.csrc/gb/test/core.c

@@ -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();
M src/gb/test/gb.hsrc/gb/test/gb.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/. */ #ifndef TEST_GB_H #define TEST_GB_H -#include "util/common.h" +#include <mgba-util/common.h> int TestRunGB(void);
M src/gb/test/mbc.csrc/gb/test/mbc.c

@@ -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);
M src/gb/test/memory.csrc/gb/test/memory.c

@@ -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);
M src/gb/test/rtc.csrc/gb/test/rtc.c

@@ -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;
M src/gb/timer.csrc/gb/timer.c

@@ -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);
M src/gb/timer.hinclude/mgba/internal/gb/timer.h

@@ -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);
M src/gb/video.csrc/gb/video.c

@@ -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);
M src/gb/video.hinclude/mgba/internal/gb/video.h

@@ -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);
M src/gba/audio.csrc/gba/audio.c

@@ -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
M src/gba/audio.hinclude/mgba/internal/gba/audio.h

@@ -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);
M src/gba/bios.csrc/gba/bios.c

@@ -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;
M src/gba/bios.hinclude/mgba/internal/gba/bios.h

@@ -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);
M src/gba/cheats.csrc/gba/cheats.c

@@ -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
M src/gba/cheats.hinclude/mgba/internal/gba/cheats.h

@@ -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)
M src/gba/cheats/codebreaker.csrc/gba/cheats/codebreaker.c

@@ -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;
M src/gba/cheats/gameshark.csrc/gba/cheats/gameshark.c

@@ -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 };
M src/gba/cheats/gameshark.hsrc/gba/cheats/gameshark.h

@@ -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);
M src/gba/cheats/parv3.csrc/gba/cheats/parv3.c

@@ -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 };
M src/gba/cheats/parv3.hsrc/gba/cheats/parv3.h

@@ -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);
M src/gba/core.csrc/gba/core.c

@@ -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;
M src/gba/core.hinclude/mgba/gba/core.h

@@ -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
M src/gba/dma.csrc/gba/dma.c

@@ -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);
M src/gba/dma.hinclude/mgba/internal/gba/dma.h

@@ -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
M src/gba/extra/cli.csrc/gba/extra/cli.c

@@ -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*);
M src/gba/extra/cli.hinclude/mgba/internal/gba/extra/cli.h

@@ -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;
M src/gba/gba.csrc/gba/gba.c

@@ -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");
M src/gba/gba.hinclude/mgba/internal/gba/gba.h

@@ -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;
M src/gba/hardware.csrc/gba/hardware.c

@@ -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");
M src/gba/hardware.hinclude/mgba/internal/gba/hardware.h

@@ -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>
M src/gba/hle-bios.csrc/gba/hle-bios.c

@@ -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,
M src/gba/hle-bios.hsrc/gba/hle-bios.h

@@ -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
M src/gba/hle-bios.makesrc/gba/hle-bios.make

@@ -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 >> $@
M src/gba/input.csrc/gba/input.c

@@ -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",
M src/gba/input.hinclude/mgba/internal/gba/input.h

@@ -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;
M src/gba/interface.hinclude/mgba/gba/interface.h

@@ -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,
M src/gba/io.csrc/gba/io.c

@@ -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");
M src/gba/io.hinclude/mgba/internal/gba/io.h

@@ -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);
M src/gba/memory.csrc/gba/memory.c

@@ -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
M src/gba/memory.hinclude/mgba/internal/gba/memory.h

@@ -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);
M src/gba/overrides.csrc/gba/overrides.c

@@ -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
M src/gba/overrides.hinclude/mgba/internal/gba/overrides.h

@@ -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
M src/gba/renderers/software-bg.csrc/gba/renderers/software-bg.c

@@ -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); \
M src/gba/renderers/software-mode0.csrc/gba/renderers/software-mode0.c

@@ -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; \
M src/gba/renderers/software-obj.csrc/gba/renderers/software-obj.c

@@ -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); \
M src/gba/renderers/software-private.hsrc/gba/renderers/software-private.h

@@ -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
M src/gba/renderers/thread-proxy.csrc/gba/renderers/thread-proxy.c

@@ -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
M src/gba/renderers/thread-proxy.hinclude/mgba/internal/gba/renderers/thread-proxy.h

@@ -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,
M src/gba/renderers/tile-cache.csrc/gba/renderers/tile-cache.c

@@ -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);
M src/gba/renderers/tile-cache.hinclude/mgba/internal/gba/renderers/tile-cache.h

@@ -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
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -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);
M src/gba/renderers/video-software.hinclude/mgba/internal/gba/renderers/video-software.h

@@ -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;
M src/gba/rr/mgm.csrc/gba/rr/mgm.c

@@ -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"
M src/gba/rr/mgm.hinclude/mgba/internal/gba/rr/mgm.h

@@ -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;
M src/gba/rr/rr.csrc/gba/rr/rr.c

@@ -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");
M src/gba/rr/rr.hinclude/mgba/internal/gba/rr/rr.h

@@ -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;
M src/gba/rr/vbm.csrc/gba/rr/vbm.c

@@ -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>
M src/gba/rr/vbm.hinclude/mgba/internal/gba/rr/vbm.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;
M src/gba/savedata.csrc/gba/savedata.c

@@ -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>
M src/gba/savedata.hinclude/mgba/internal/gba/savedata.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);
M src/gba/serialize.csrc/gba/serialize.c

@@ -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
M src/gba/serialize.hinclude/mgba/internal/gba/serialize.h

@@ -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;
M src/gba/sharkport.csrc/gba/sharkport.c

@@ -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";
M src/gba/sharkport.hinclude/mgba/internal/gba/sharkport.h

@@ -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
M src/gba/sio.csrc/gba/sio.c

@@ -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");
M src/gba/sio.hinclude/mgba/internal/gba/sio.h

@@ -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
M src/gba/sio/lockstep.csrc/gba/sio/lockstep.c

@@ -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
M src/gba/sio/lockstep.hinclude/mgba/internal/gba/sio/lockstep.h

@@ -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;
M src/gba/test/core.csrc/gba/test/core.c

@@ -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();
M src/gba/test/gba.hsrc/gba/test/gba.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/. */ #ifndef TEST_GBA_H #define TEST_GBA_H -#include "util/common.h" +#include <mgba-util/common.h> int TestRunGBA(void);
M src/gba/timer.csrc/gba/timer.c

@@ -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];
M src/gba/timer.hinclude/mgba/internal/gba/timer.h

@@ -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);
M src/gba/vfame.csrc/gba/vfame.c

@@ -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 },
M src/gba/vfame.hinclude/mgba/internal/gba/vfame.h

@@ -9,7 +9,7 @@

#ifndef GBA_VFAME_H #define GBA_VFAME_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START
M src/gba/video.csrc/gba/video.c

@@ -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");
M src/gba/video.hinclude/mgba/internal/gba/video.h

@@ -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);
M src/lr35902/debugger/cli-debugger.csrc/lr35902/debugger/cli-debugger.c

@@ -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*);
M src/lr35902/debugger/cli-debugger.hinclude/mgba/internal/lr35902/debugger/cli-debugger.h

@@ -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
M src/lr35902/debugger/debugger.csrc/lr35902/debugger/debugger.c

@@ -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);
M src/lr35902/debugger/debugger.hinclude/mgba/internal/lr35902/debugger/debugger.h

@@ -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;
M src/lr35902/isa-lr35902.csrc/lr35902/isa-lr35902.c

@@ -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;
M src/lr35902/isa-lr35902.hinclude/mgba/internal/lr35902/isa-lr35902.h

@@ -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
M src/lr35902/lr35902.csrc/lr35902/lr35902.c

@@ -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);
M src/lr35902/lr35902.hinclude/mgba/internal/lr35902/lr35902.h

@@ -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;
M src/platform/3ds/3ds-memory.csrc/platform/3ds/3ds-memory.c

@@ -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>
M src/platform/3ds/3ds-vfs.csrc/platform/3ds/3ds-vfs.c

@@ -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;
M src/platform/3ds/3ds-vfs.hinclude/mgba-util/platform/3ds/3ds-vfs.h

@@ -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>
M src/platform/3ds/ctru-heap.csrc/platform/3ds/ctru-heap.c

@@ -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;
M src/platform/3ds/gui-font.csrc/platform/3ds/gui-font.c

@@ -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"
M src/platform/3ds/main.csrc/platform/3ds/main.c

@@ -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>
M src/platform/3ds/socket.csrc/platform/3ds/socket.c

@@ -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;
M src/platform/3ds/threading.hinclude/mgba-util/platform/3ds/threading.h

@@ -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>
M src/platform/example/client-server/client.csrc/platform/example/client-server/client.c

@@ -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>
M src/platform/example/client-server/server.csrc/platform/example/client-server/server.c

@@ -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
M src/platform/libretro/libretro.csrc/platform/libretro/libretro.c

@@ -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; }
M src/platform/openemu/mGBAGameCore.msrc/platform/openemu/mGBAGameCore.m

@@ -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
M src/platform/opengl/gl.csrc/platform/opengl/gl.c

@@ -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,
M src/platform/opengl/gl.hsrc/platform/opengl/gl.h

@@ -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
M src/platform/opengl/gles2.csrc/platform/opengl/gles2.c

@@ -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");
M src/platform/opengl/gles2.hsrc/platform/opengl/gles2.h

@@ -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
M src/platform/posix/memory.csrc/platform/posix/memory.c

@@ -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>
M src/platform/posix/threading.hinclude/mgba-util/platform/posix/threading.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
M src/platform/psp2/gui-font.csrc/platform/psp2/gui-font.c

@@ -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>
M src/platform/psp2/main.csrc/platform/psp2/main.c

@@ -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>
M src/platform/psp2/psp2-common.hsrc/platform/psp2/psp2-common.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
M src/platform/psp2/psp2-context.csrc/platform/psp2/psp2-context.c

@@ -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>
M src/platform/psp2/psp2-context.hsrc/platform/psp2/psp2-context.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);
M src/platform/psp2/psp2-memory.csrc/platform/psp2/psp2-memory.c

@@ -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>
M src/platform/psp2/sce-vfs.csrc/platform/psp2/sce-vfs.c

@@ -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;
M src/platform/python/_builder.hsrc/platform/python/_builder.h

@@ -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
M src/platform/python/_builder.pysrc/platform/python/_builder.py

@@ -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],
M src/platform/python/log.csrc/platform/python/log.c

@@ -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; -}+}
M src/platform/python/log.hsrc/platform/python/log.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 "core/log.h" +#include <mgba/core/log.h> struct mLoggerPy { struct mLogger d;
M src/platform/python/vfs-py.csrc/platform/python/vfs-py.c

@@ -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;
M src/platform/python/vfs-py.hsrc/platform/python/vfs-py.h

@@ -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); -}+}
M src/platform/qt/AboutScreen.cppsrc/platform/qt/AboutScreen.cpp

@@ -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>
M src/platform/qt/ArchiveInspector.cppsrc/platform/qt/ArchiveInspector.cpp

@@ -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;
M src/platform/qt/AssetTile.cppsrc/platform/qt/AssetTile.cpp

@@ -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;
M src/platform/qt/AssetTile.hsrc/platform/qt/AssetTile.h

@@ -10,7 +10,7 @@ #include "GameController.h"

#include "ui_AssetTile.h" -#include "core/tile-cache.h" +#include <mgba/core/tile-cache.h> namespace QGBA {
M src/platform/qt/AssetView.cppsrc/platform/qt/AssetView.cpp

@@ -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)
M src/platform/qt/AudioDevice.cppsrc/platform/qt/AudioDevice.cpp

@@ -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;
M src/platform/qt/AudioProcessorQt.cppsrc/platform/qt/AudioProcessorQt.cpp

@@ -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;
M src/platform/qt/AudioProcessorSDL.cppsrc/platform/qt/AudioProcessorSDL.cpp

@@ -7,7 +7,7 @@ #include "AudioProcessorSDL.h"

#include "LogController.h" -#include "core/thread.h" +#include <mgba/core/thread.h> using namespace QGBA;
M src/platform/qt/CheatsModel.cppsrc/platform/qt/CheatsModel.cpp

@@ -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;
M src/platform/qt/CheatsView.cppsrc/platform/qt/CheatsView.cpp

@@ -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;
M src/platform/qt/ConfigController.hsrc/platform/qt/ConfigController.h

@@ -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;
M src/platform/qt/DebuggerConsoleController.cppsrc/platform/qt/DebuggerConsoleController.cpp

@@ -9,7 +9,7 @@ #include "GameController.h"

#include <QMutexLocker> -#include "debugger/cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> using namespace QGBA;
M src/platform/qt/DebuggerConsoleController.hsrc/platform/qt/DebuggerConsoleController.h

@@ -12,7 +12,7 @@ #include <QMutex>

#include <QStringList> #include <QWaitCondition> -#include "debugger/cli-debugger.h" +#include <mgba/internal/debugger/cli-debugger.h> namespace QGBA {
M src/platform/qt/Display.cppsrc/platform/qt/Display.cpp

@@ -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;
M src/platform/qt/Display.hsrc/platform/qt/Display.h

@@ -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>
M src/platform/qt/DisplayGL.cppsrc/platform/qt/DisplayGL.cpp

@@ -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
M src/platform/qt/DisplayQt.cppsrc/platform/qt/DisplayQt.cpp

@@ -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;
M src/platform/qt/GBAApp.cppsrc/platform/qt/GBAApp.cpp

@@ -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;
M src/platform/qt/GBAApp.hsrc/platform/qt/GBAApp.h

@@ -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);
M src/platform/qt/GBAKeyEditor.hsrc/platform/qt/GBAKeyEditor.h

@@ -11,7 +11,7 @@ #include <QPicture>

#include <QSet> #include <QWidget> -#include "gba/input.h" +#include <mgba/internal/gba/input.h> class QComboBox; class QTimer;
M src/platform/qt/GBAOverride.cppsrc/platform/qt/GBAOverride.cpp

@@ -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;
M src/platform/qt/GBAOverride.hsrc/platform/qt/GBAOverride.h

@@ -8,7 +8,7 @@ #define QGBA_GBA_OVERRIDE

#include "Override.h" -#include "gba/overrides.h" +#include <mgba/internal/gba/overrides.h> namespace QGBA {
M src/platform/qt/GBOverride.cppsrc/platform/qt/GBOverride.cpp

@@ -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;
M src/platform/qt/GBOverride.hsrc/platform/qt/GBOverride.h

@@ -8,7 +8,7 @@ #define QGBA_GB_OVERRIDE

#include "Override.h" -#include "gb/overrides.h" +#include <mgba/internal/gb/overrides.h> namespace QGBA {
M src/platform/qt/GDBController.hsrc/platform/qt/GDBController.h

@@ -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 {
M src/platform/qt/GIFView.cppsrc/platform/qt/GIFView.cpp

@@ -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)
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -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;
M src/platform/qt/GameController.hsrc/platform/qt/GameController.h

@@ -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
M src/platform/qt/GamepadAxisEvent.hsrc/platform/qt/GamepadAxisEvent.h

@@ -8,7 +8,7 @@ #define QGBA_GAMEPAD_AXIS_EVENT

#include <QEvent> -#include "gba/input.h" +#include <mgba/internal/gba/input.h> namespace QGBA {
M src/platform/qt/GamepadButtonEvent.hsrc/platform/qt/GamepadButtonEvent.h

@@ -8,7 +8,7 @@ #define QGBA_GAMEPAD_BUTTON_EVENT

#include <QEvent> -#include "gba/input.h" +#include <mgba/internal/gba/input.h> namespace QGBA {
M src/platform/qt/IOViewer.cppsrc/platform/qt/IOViewer.cpp

@@ -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;
M src/platform/qt/InputController.cppsrc/platform/qt/InputController.cpp

@@ -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;
M src/platform/qt/InputController.hsrc/platform/qt/InputController.h

@@ -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"
M src/platform/qt/InputProfile.hsrc/platform/qt/InputProfile.h

@@ -8,7 +8,7 @@ #define QGBA_INPUT_PROFILE

#include "GamepadAxisEvent.h" -#include "gba/interface.h" +#include <mgba/gba/interface.h> namespace QGBA {
M src/platform/qt/LibraryModel.cppsrc/platform/qt/LibraryModel.cpp

@@ -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;
M src/platform/qt/LibraryModel.hsrc/platform/qt/LibraryModel.h

@@ -8,7 +8,7 @@ #define QGBA_LIBRARY_MODEL

#include <QAbstractItemModel> -#include "core/library.h" +#include <mgba/core/library.h> struct VDir;
M src/platform/qt/LoadSaveState.cppsrc/platform/qt/LoadSaveState.cpp

@@ -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;
M src/platform/qt/LogController.hsrc/platform/qt/LogController.h

@@ -11,8 +11,6 @@

#include <QObject> #include <QStringList> -#include "gba/gba.h" - namespace QGBA { class LogController : public QObject {
M src/platform/qt/MemoryModel.cppsrc/platform/qt/MemoryModel.cpp

@@ -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;
M src/platform/qt/MemoryModel.hsrc/platform/qt/MemoryModel.h

@@ -13,7 +13,7 @@ #include <QStaticText>

#include <QVector> #include <memory> -#include "util/text-codec.h" +#include <mgba-util/text-codec.h> struct mCore;
M src/platform/qt/MemoryView.cppsrc/platform/qt/MemoryView.cpp

@@ -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;
M src/platform/qt/MessagePainter.cppsrc/platform/qt/MessagePainter.cpp

@@ -9,7 +9,7 @@ #include <QPainter>

#include <QDebug> -#include "gba/video.h" +#include <mgba/internal/gba/video.h> using namespace QGBA;
M src/platform/qt/MultiplayerController.cppsrc/platform/qt/MultiplayerController.cpp

@@ -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;
M src/platform/qt/MultiplayerController.hsrc/platform/qt/MultiplayerController.h

@@ -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 {
M src/platform/qt/ObjView.cppsrc/platform/qt/ObjView.cpp

@@ -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;
M src/platform/qt/ObjView.hsrc/platform/qt/ObjView.h

@@ -11,7 +11,7 @@ #include "GameController.h"

#include "ui_ObjView.h" -#include "core/tile-cache.h" +#include <mgba/core/tile-cache.h> namespace QGBA {
M src/platform/qt/OverrideView.cppsrc/platform/qt/OverrideView.cpp

@@ -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;
M src/platform/qt/OverrideView.hsrc/platform/qt/OverrideView.h

@@ -9,7 +9,7 @@

#include <QDialog> #ifdef M_CORE_GB -#include "gb/overrides.h" +#include <mgba/gb/interface.h> #endif #include "ui_OverrideView.h"
M src/platform/qt/PaletteView.cppsrc/platform/qt/PaletteView.cpp

@@ -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;
M src/platform/qt/ROMInfo.cppsrc/platform/qt/ROMInfo.cpp

@@ -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;
M src/platform/qt/SensorView.cppsrc/platform/qt/SensorView.cpp

@@ -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;
M src/platform/qt/SettingsView.cppsrc/platform/qt/SettingsView.cpp

@@ -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;
M src/platform/qt/ShaderSelector.cppsrc/platform/qt/ShaderSelector.cpp

@@ -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)
M src/platform/qt/Swatch.cppsrc/platform/qt/Swatch.cpp

@@ -8,7 +8,7 @@

#include <QMouseEvent> #include <QPainter> -#include "core/interface.h" +#include <mgba/core/interface.h> using namespace QGBA;
M src/platform/qt/TileView.cppsrc/platform/qt/TileView.cpp

@@ -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;
M src/platform/qt/TileView.hsrc/platform/qt/TileView.h

@@ -11,7 +11,7 @@ #include "GameController.h"

#include "ui_TileView.h" -#include "core/tile-cache.h" +#include <mgba/core/tile-cache.h> namespace QGBA {
M src/platform/qt/VFileDevice.cppsrc/platform/qt/VFileDevice.cpp

@@ -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)
M src/platform/qt/VFileDevice.hsrc/platform/qt/VFileDevice.h

@@ -8,7 +8,8 @@ #define QGBA_VFILE_DEVICE

#include <QFileDevice> -#include "util/vfs.h" +struct VDir; +struct VFile; namespace QGBA {
M src/platform/qt/VideoView.cppsrc/platform/qt/VideoView.cpp

@@ -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;
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -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;
M src/platform/qt/Window.hsrc/platform/qt/Window.h

@@ -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"
M src/platform/sdl/gl-common.csrc/platform/sdl/gl-common.c

@@ -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;
M src/platform/sdl/gl-common.hsrc/platform/sdl/gl-common.h

@@ -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
M src/platform/sdl/gl-sdl.csrc/platform/sdl/gl-sdl.c

@@ -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) {
M src/platform/sdl/main.csrc/platform/sdl/main.c

@@ -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>
M src/platform/sdl/main.hsrc/platform/sdl/main.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"
M src/platform/sdl/sdl-audio.csrc/platform/sdl/sdl-audio.c

@@ -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)
M src/platform/sdl/sdl-audio.hsrc/platform/sdl/sdl-audio.h

@@ -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>
M src/platform/sdl/sdl-events.csrc/platform/sdl/sdl-events.c

@@ -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
M src/platform/sdl/sdl-events.hsrc/platform/sdl/sdl-events.h

@@ -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>
M src/platform/test/fuzz-main.csrc/platform/test/fuzz-main.c

@@ -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>
M src/platform/test/perf-main.csrc/platform/test/perf-main.c

@@ -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>
M src/platform/test/tbl-fuzz-main.csrc/platform/test/tbl-fuzz-main.c

@@ -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;
M src/platform/video-backend.hsrc/platform/video-backend.h

@@ -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
M src/platform/wii/gui-font.csrc/platform/wii/gui-font.c

@@ -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"
M src/platform/wii/main.csrc/platform/wii/main.c

@@ -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
M src/platform/wii/wii-memory.csrc/platform/wii/wii-memory.c

@@ -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);
M src/platform/windows/threading.hinclude/mgba-util/platform/windows/threading.h

@@ -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>
M src/platform/windows/vfs-w32.csrc/platform/windows/vfs-w32.c

@@ -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);
M src/third-party/blip_buf/blip_buf.csrc/third-party/blip_buf/blip_buf.c

@@ -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>
M src/util/circle-buffer.csrc/util/circle-buffer.c

@@ -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) {
M src/util/circle-buffer.hinclude/mgba-util/circle-buffer.h

@@ -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
M src/util/configuration.csrc/util/configuration.c

@@ -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"
M src/util/configuration.hinclude/mgba-util/configuration.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;
M src/util/crc32.csrc/util/crc32.c

@@ -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
M src/util/crc32.hinclude/mgba-util/crc32.h

@@ -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
M src/util/export.csrc/util/export.c

@@ -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) {
M src/util/export.hinclude/mgba-util/export.h

@@ -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
M src/util/formatting.csrc/util/formatting.c

@@ -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>
M src/util/formatting.hinclude/mgba-util/formatting.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
M src/util/gui.csrc/util/gui.c

@@ -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));
M src/util/gui.hinclude/mgba-util/gui.h

@@ -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;
M src/util/gui/file-select.csrc/util/gui/file-select.c

@@ -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>
M src/util/gui/file-select.hinclude/mgba-util/gui/file-select.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;
M src/util/gui/font-metrics.csrc/util/gui/font-metrics.c

@@ -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
M src/util/gui/font-metrics.hinclude/mgba-util/gui/font-metrics.h

@@ -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[];
M src/util/gui/font.csrc/util/gui/font.c

@@ -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;
M src/util/gui/font.hinclude/mgba-util/gui/font.h

@@ -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
M src/util/gui/menu.csrc/util/gui/menu.c

@@ -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 "menu.h" +#include <mgba-util/gui/menu.h> -#include "util/gui.h" -#include "util/gui/font.h" +#include <mgba-util/gui.h> +#include <mgba-util/gui/font.h> #ifdef _3DS #include <3ds.h>
M src/util/gui/menu.hinclude/mgba-util/gui/menu.h

@@ -6,11 +6,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef GUI_MENU_H #define GUI_MENU_H -#include "util/common.h" +#include <mgba-util/common.h> CXX_GUARD_START -#include "util/vector.h" +#include <mgba-util/vector.h> struct GUIMenu; struct GUIMenuItem {
M src/util/hash.csrc/util/hash.c

@@ -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)
M src/util/hash.hinclude/mgba-util/hash.h

@@ -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
M src/util/math.hinclude/mgba-util/math.h

@@ -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
M src/util/memory.hinclude/mgba-util/memory.h

@@ -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
M src/util/nointro.csrc/util/nointro.c

@@ -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
M src/util/nointro.hinclude/mgba-util/nointro.h

@@ -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
M src/util/patch-fast.csrc/util/patch-fast.c

@@ -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);
M src/util/patch-fast.hinclude/mgba-util/patch/fast.h

@@ -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
M src/util/patch-ips.csrc/util/patch-ips.c

@@ -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);
M src/util/patch-ips.hinclude/mgba-util/patch/ips.h

@@ -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
M src/util/patch-ups.csrc/util/patch-ups.c

@@ -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,
M src/util/patch-ups.hinclude/mgba-util/patch/ups.h

@@ -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
M src/util/patch.csrc/util/patch.c

@@ -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;
M src/util/patch.hinclude/mgba-util/patch.h

@@ -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
M src/util/png-io.csrc/util/png-io.c

@@ -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);
M src/util/png-io.hinclude/mgba-util/png-io.h

@@ -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
M src/util/ring-fifo.csrc/util/ring-fifo.c

@@ -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);
M src/util/ring-fifo.hinclude/mgba-util/ring-fifo.h

@@ -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
M src/util/socket.hinclude/mgba-util/socket.h

@@ -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
M src/util/string.csrc/util/string.c

@@ -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>
M src/util/string.hinclude/mgba-util/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
M src/util/table.csrc/util/table.c

@@ -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
M src/util/table.hinclude/mgba-util/table.h

@@ -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
M src/util/test/suite.hsrc/util/test/suite.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/. */ #ifndef SUITE_H #define SUITE_H -#include "util/common.h" +#include <mgba-util/common.h> #include <setjmp.h> #include <cmocka.h>
M src/util/test/text-codec.csrc/util/test/text-codec.c

@@ -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);
M src/util/test/util.hsrc/util/test/util.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/. */ #ifndef TEST_UTIL_H #define TEST_UTIL_H -#include "util/common.h" +#include <mgba-util/common.h> int TestRunUtil(void);
M src/util/test/vfs.csrc/util/test/vfs.c

@@ -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) {
M src/util/text-codec.csrc/util/text-codec.c

@@ -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;
M src/util/text-codec.hinclude/mgba-util/text-codec.h

@@ -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
M src/util/threading.hinclude/mgba-util/threading.h

@@ -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
M src/util/vector.hinclude/mgba-util/vector.h

@@ -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
M src/util/vfs.csrc/util/vfs.c

@@ -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) {
M src/util/vfs.hinclude/mgba-util/vfs.h

@@ -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);
M src/util/vfs/vfs-devlist.csrc/util/vfs/vfs-devlist.c

@@ -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>
M src/util/vfs/vfs-dirent.csrc/util/vfs/vfs-dirent.c

@@ -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>
M src/util/vfs/vfs-fd.csrc/util/vfs/vfs-fd.c

@@ -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>
M src/util/vfs/vfs-file.csrc/util/vfs/vfs-file.c

@@ -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>
M src/util/vfs/vfs-lzma.csrc/util/vfs/vfs-lzma.c

@@ -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"
M src/util/vfs/vfs-mem.csrc/util/vfs/vfs-mem.c

@@ -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;
M src/util/vfs/vfs-zip.csrc/util/vfs/vfs-zip.c

@@ -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;