All: Migrate includes to separate directory

This commit is contained in:
Jeffrey Pfau 2016-12-30 17:00:22 -08:00
parent 6d898542c7
commit fa884d071e
371 changed files with 1099 additions and 1111 deletions

View File

@ -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("GBA extra" FILES ${GBA_CHEATS_SRC} ${GBA_RR_SRC})
source_group("GB board" FILES ${GB_SRC} ${GB_SIO_SRC}) source_group("GB board" FILES ${GB_SRC} ${GB_SIO_SRC})
source_group("Utilities" FILES ${UTIL_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) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type (e.g. Release or Debug)" FORCE) set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type (e.g. Release or Debug)" FORCE)
@ -774,7 +774,7 @@ if(BUILD_EXAMPLE)
target_link_libraries(${BINARY_NAME}-example-client ${BINARY_NAME} ${SDL_LIBRARY} ${SDLMAIN_LIBRARY} ${OPENGL_LIBRARY} ${OPENGLES2_LIBRARY}) 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 set_target_properties(${BINARY_NAME}-example-client PROPERTIES
COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES}" 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()
endif() endif()

View File

@ -6,7 +6,7 @@
#ifndef CIRCLE_BUFFER_H #ifndef CIRCLE_BUFFER_H
#define CIRCLE_BUFFER_H #define CIRCLE_BUFFER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,11 +6,11 @@
#ifndef CONFIGURATION_H #ifndef CONFIGURATION_H
#define CONFIGURATION_H #define CONFIGURATION_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "util/table.h" #include <mgba-util/table.h>
struct VFile; struct VFile;

View File

@ -6,7 +6,7 @@
#ifndef CRC32_H #ifndef CRC32_H
#define CRC32_H #define CRC32_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef EXPORT_H #ifndef EXPORT_H
#define EXPORT_H #define EXPORT_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef FORMATTING_H #ifndef FORMATTING_H
#define FORMATTING_H #define FORMATTING_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,12 +6,13 @@
#ifndef GUI_H #ifndef GUI_H
#define GUI_H #define GUI_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/input.h" // TODO: Fix layering violation
#include "util/vector.h" #include <mgba/core/input.h>
#include <mgba-util/vector.h>
struct GUIFont; struct GUIFont;

View File

@ -6,11 +6,11 @@
#ifndef GUI_FILE_CHOOSER_H #ifndef GUI_FILE_CHOOSER_H
#define GUI_FILE_CHOOSER_H #define GUI_FILE_CHOOSER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "util/gui.h" #include <mgba-util/gui.h>
struct VFile; struct VFile;

View File

@ -6,7 +6,7 @@
#ifndef DEFAULT_FONT_METRICS_H #ifndef DEFAULT_FONT_METRICS_H
#define 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 GUIFontGlyphMetric defaultFontMetrics[];
extern struct GUIIconMetric defaultIconMetrics[]; extern struct GUIIconMetric defaultIconMetrics[];

View File

@ -6,7 +6,7 @@
#ifndef GUI_FONT_H #ifndef GUI_FONT_H
#define GUI_FONT_H #define GUI_FONT_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,11 +6,11 @@
#ifndef GUI_MENU_H #ifndef GUI_MENU_H
#define GUI_MENU_H #define GUI_MENU_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "util/vector.h" #include <mgba-util/vector.h>
struct GUIMenu; struct GUIMenu;
struct GUIMenuItem { struct GUIMenuItem {

View File

@ -6,7 +6,7 @@
#ifndef HASH_H #ifndef HASH_H
#define HASH_H #define HASH_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef UTIL_MATH_H #ifndef UTIL_MATH_H
#define UTIL_MATH_H #define UTIL_MATH_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef MEMORY_H #ifndef MEMORY_H
#define MEMORY_H #define MEMORY_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef NOINTRO_H #ifndef NOINTRO_H
#define NOINTRO_H #define NOINTRO_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef PATCH_H #ifndef PATCH_H
#define PATCH_H #define PATCH_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,12 +6,12 @@
#ifndef PATCH_FAST_H #ifndef PATCH_FAST_H
#define PATCH_FAST_H #define PATCH_FAST_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "util/patch.h" #include <mgba-util/patch.h>
#include "util/vector.h" #include <mgba-util/vector.h>
#define PATCH_FAST_EXTENT 256 #define PATCH_FAST_EXTENT 256

View File

@ -6,7 +6,7 @@
#ifndef PATCH_IPS_H #ifndef PATCH_IPS_H
#define PATCH_IPS_H #define PATCH_IPS_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef PATCH_UPS_H #ifndef PATCH_UPS_H
#define PATCH_UPS_H #define PATCH_UPS_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef N3DS_VFS_H #ifndef N3DS_VFS_H
#define N3DS_VFS_H #define N3DS_VFS_H
#include "util/vfs.h" #include <mgba-util/vfs.h>
#include <3ds.h> #include <3ds.h>

View File

@ -6,7 +6,7 @@
#ifndef N3DS_THREADING_H #ifndef N3DS_THREADING_H
#define N3DS_THREADING_H #define N3DS_THREADING_H
#include "util/common.h" #include <mgba-util/common.h>
#include <3ds.h> #include <3ds.h>
#include <malloc.h> #include <malloc.h>

View File

@ -6,7 +6,7 @@
#ifndef POSIX_THREADING_H #ifndef POSIX_THREADING_H
#define POSIX_THREADING_H #define POSIX_THREADING_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef WINDOWS_THREADING_H #ifndef WINDOWS_THREADING_H
#define WINDOWS_THREADING_H #define WINDOWS_THREADING_H
#include "util/common.h" #include <mgba-util/common.h>
#define _WIN32_WINNT 0x0600 #define _WIN32_WINNT 0x0600
#include <windows.h> #include <windows.h>

View File

@ -6,7 +6,7 @@
#ifndef PNG_IO_H #ifndef PNG_IO_H
#define PNG_IO_H #define PNG_IO_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef RING_FIFO_H #ifndef RING_FIFO_H
#define RING_FIFO_H #define RING_FIFO_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef SOCKET_H #ifndef SOCKET_H
#define SOCKET_H #define SOCKET_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef UTIL_STRING_H #ifndef UTIL_STRING_H
#define UTIL_STRING_H #define UTIL_STRING_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef TABLE_H #ifndef TABLE_H
#define TABLE_H #define TABLE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef TEXT_CODEC_H #ifndef TEXT_CODEC_H
#define TEXT_CODEC_H #define TEXT_CODEC_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,19 +6,19 @@
#ifndef THREADING_H #ifndef THREADING_H
#define THREADING_H #define THREADING_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#ifndef DISABLE_THREADING #ifndef DISABLE_THREADING
#ifdef USE_PTHREADS #ifdef USE_PTHREADS
#include "platform/posix/threading.h" #include <mgba-util/platform/posix/threading.h>
#elif _WIN32 #elif _WIN32
#include "platform/windows/threading.h" #include <mgba-util/platform/windows/threading.h>
#elif PSP2 #elif PSP2
#include "platform/psp2/threading.h" #include <mgba-util/platform/psp2/threading.h>
#elif _3DS #elif _3DS
#include "platform/3ds/threading.h" #include <mgba-util/platform/3ds/threading.h>
#else #else
#define DISABLE_THREADING #define DISABLE_THREADING
#endif #endif

View File

@ -6,7 +6,7 @@
#ifndef VECTOR_H #ifndef VECTOR_H
#define VECTOR_H #define VECTOR_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef VFS_H #ifndef VFS_H
#define VFS_H #define VFS_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
@ -84,7 +84,7 @@ struct VDir* VDirOpenZip(const char* path, int flags);
struct VDir* VDirOpen7z(const char* path, int flags); struct VDir* VDirOpen7z(const char* path, int flags);
#endif #endif
#if defined(WII) || defined(_3DS) #if defined(__wii__) || defined(_3DS)
struct VFile* VFileFOpen(const char* path, const char* mode); struct VFile* VFileFOpen(const char* path, const char* mode);
struct VFile* VFileFromFILE(FILE* file); struct VFile* VFileFromFILE(FILE* file);
struct VDir* VDeviceList(void); struct VDir* VDeviceList(void);

View File

@ -6,13 +6,13 @@
#ifndef CHEATS_H #ifndef CHEATS_H
#define CHEATS_H #define CHEATS_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/cpu.h" #include <mgba/core/cpu.h>
#include "core/log.h" #include <mgba/core/log.h>
#include "util/vector.h" #include <mgba-util/vector.h>
#define MAX_ROM_PATCHES 4 #define MAX_ROM_PATCHES 4

View File

@ -6,11 +6,11 @@
#ifndef M_CORE_CONFIG_H #ifndef M_CORE_CONFIG_H
#define M_CORE_CONFIG_H #define M_CORE_CONFIG_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "util/configuration.h" #include <mgba-util/configuration.h>
struct mCoreConfig { struct mCoreConfig {
struct Configuration configTable; struct Configuration configTable;

View File

@ -6,20 +6,21 @@
#ifndef M_CORE_H #ifndef M_CORE_H
#define M_CORE_H #define M_CORE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/config.h" #include <mgba/core/config.h>
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
#include "core/directories.h" #include <mgba/core/directories.h>
#endif #endif
#ifndef MINIMAL_CORE #ifndef MINIMAL_CORE
#include "core/input.h" #include <mgba/core/input.h>
#endif #endif
#include "core/interface.h" #include <mgba/core/interface.h>
#ifdef USE_DEBUGGERS #ifdef USE_DEBUGGERS
#include "debugger/debugger.h" // TODO: Fix layering violation
#include <mgba/internal/debugger/debugger.h>
#endif #endif
enum mPlatform { enum mPlatform {

View File

@ -6,7 +6,7 @@
#ifndef M_CPU_H #ifndef M_CPU_H
#define M_CPU_H #define M_CPU_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef DIRECTORIES_H #ifndef DIRECTORIES_H
#define DIRECTORIES_H #define DIRECTORIES_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef M_INPUT_H #ifndef M_INPUT_H
#define M_INPUT_H #define M_INPUT_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef CORE_INTERFACE_H #ifndef CORE_INTERFACE_H
#define CORE_INTERFACE_H #define CORE_INTERFACE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,12 +6,12 @@
#ifndef M_LIBRARY_H #ifndef M_LIBRARY_H
#define M_LIBRARY_H #define M_LIBRARY_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/core.h" #include <mgba/core/core.h>
#include "util/vector.h" #include <mgba-util/vector.h>
struct mLibraryEntry { struct mLibraryEntry {
char* filename; char* filename;

View File

@ -6,7 +6,7 @@
#ifndef SIO_LOCKSTEP_H #ifndef SIO_LOCKSTEP_H
#define SIO_LOCKSTEP_H #define SIO_LOCKSTEP_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef M_LOG_H #ifndef M_LOG_H
#define M_LOG_H #define M_LOG_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,11 +6,11 @@
#ifndef M_CORE_REWIND_H #ifndef M_CORE_REWIND_H
#define M_CORE_REWIND_H #define M_CORE_REWIND_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "util/vector.h" #include <mgba-util/vector.h>
DECLARE_VECTOR(mCoreRewindPatches, struct PatchFast); DECLARE_VECTOR(mCoreRewindPatches, struct PatchFast);

View File

@ -6,7 +6,7 @@
#ifndef M_SERIALIZE_H #ifndef M_SERIALIZE_H
#define M_SERIALIZE_H #define M_SERIALIZE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,11 +6,11 @@
#ifndef M_CORE_SYNC_H #ifndef M_CORE_SYNC_H
#define M_CORE_SYNC_H #define M_CORE_SYNC_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "util/threading.h" #include <mgba-util/threading.h>
struct mCoreSync { struct mCoreSync {
int videoFramePending; int videoFramePending;

View File

@ -6,14 +6,14 @@
#ifndef M_CORE_THREAD_H #ifndef M_CORE_THREAD_H
#define M_CORE_THREAD_H #define M_CORE_THREAD_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/log.h" #include <mgba/core/log.h>
#include "core/rewind.h" #include <mgba/core/rewind.h>
#include "core/sync.h" #include <mgba/core/sync.h>
#include "util/threading.h" #include <mgba-util/threading.h>
struct mCoreThread; struct mCoreThread;
struct mCore; struct mCore;

View File

@ -6,7 +6,7 @@
#ifndef M_TILE_CACHE_H #ifndef M_TILE_CACHE_H
#define M_TILE_CACHE_H #define M_TILE_CACHE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef M_CORE_TIMING #ifndef M_CORE_TIMING
#define M_CORE_TIMING #define M_CORE_TIMING
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef GB_CORE_H #ifndef GB_CORE_H
#define GB_CORE_H #define GB_CORE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef GB_INTERFACE_H #ifndef GB_INTERFACE_H
#define GB_INTERFACE_H #define GB_INTERFACE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef GBA_CORE_H #ifndef GBA_CORE_H
#define GBA_CORE_H #define GBA_CORE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,11 +6,11 @@
#ifndef GBA_INTERFACE_H #ifndef GBA_INTERFACE_H
#define GBA_INTERFACE_H #define GBA_INTERFACE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/interface.h" #include <mgba/core/interface.h>
enum GBASIOMode { enum GBASIOMode {
SIO_NORMAL_8 = 0, SIO_NORMAL_8 = 0,

View File

@ -6,11 +6,11 @@
#ifndef ARM_H #ifndef ARM_H
#define ARM_H #define ARM_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/cpu.h" #include <mgba/core/cpu.h>
enum { enum {
ARM_SP = 13, ARM_SP = 13,

View File

@ -6,7 +6,7 @@
#ifndef ARM_CLI_DEBUGGER_H #ifndef ARM_CLI_DEBUGGER_H
#define ARM_CLI_DEBUGGER_H #define ARM_CLI_DEBUGGER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,13 +6,13 @@
#ifndef ARM_DEBUGGER_H #ifndef ARM_DEBUGGER_H
#define ARM_DEBUGGER_H #define ARM_DEBUGGER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START 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 { struct ARMDebugBreakpoint {
uint32_t address; uint32_t address;

View File

@ -6,7 +6,7 @@
#ifndef MEMORY_DEBUGGER_H #ifndef MEMORY_DEBUGGER_H
#define MEMORY_DEBUGGER_H #define MEMORY_DEBUGGER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,11 +6,11 @@
#ifndef ARM_DECODER_H #ifndef ARM_DECODER_H
#define ARM_DECODER_H #define ARM_DECODER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "arm.h" #include <mgba/internal/arm/arm.h>
// Bit 0: a register is involved with this operand // Bit 0: a register is involved with this operand
// Bit 1: an immediate is invovled with this operand // Bit 1: an immediate is invovled with this operand

View File

@ -6,7 +6,7 @@
#ifndef ISA_ARM_H #ifndef ISA_ARM_H
#define ISA_ARM_H #define ISA_ARM_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef ISA_THUMB_H #ifndef ISA_THUMB_H
#define ISA_THUMB_H #define ISA_THUMB_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,7 +6,7 @@
#ifndef MACROS_H #ifndef MACROS_H
#define MACROS_H #define MACROS_H
#include "util/common.h" #include <mgba-util/common.h>
#define LOAD_64 LOAD_64LE #define LOAD_64 LOAD_64LE
#define LOAD_32 LOAD_32LE #define LOAD_32 LOAD_32LE

View File

@ -6,11 +6,11 @@
#ifndef CLI_DEBUGGER_H #ifndef CLI_DEBUGGER_H
#define CLI_DEBUGGER_H #define CLI_DEBUGGER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "debugger.h" #include <mgba/internal/debugger/debugger.h>
struct CLIDebugger; struct CLIDebugger;

View File

@ -6,13 +6,13 @@
#ifndef DEBUGGER_H #ifndef DEBUGGER_H
#define DEBUGGER_H #define DEBUGGER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/cpu.h" #include <mgba/core/cpu.h>
#include "core/log.h" #include <mgba/core/log.h>
#include "util/vector.h" #include <mgba-util/vector.h>
mLOG_DECLARE_CATEGORY(DEBUGGER); mLOG_DECLARE_CATEGORY(DEBUGGER);

View File

@ -6,13 +6,13 @@
#ifndef GDB_STUB_H #ifndef GDB_STUB_H
#define GDB_STUB_H #define GDB_STUB_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START 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_MAX_LINE 1200
#define GDB_STUB_INTERVAL 32 #define GDB_STUB_INTERVAL 32

View File

@ -6,11 +6,11 @@
#ifndef PARSER_H #ifndef PARSER_H
#define PARSER_H #define PARSER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "debugger.h" #include <mgba/internal/debugger/debugger.h>
enum LexState { enum LexState {
LEX_ERROR = -1, LEX_ERROR = -1,

View File

@ -6,12 +6,11 @@
#ifndef GB_AUDIO_H #ifndef GB_AUDIO_H
#define GB_AUDIO_H #define GB_AUDIO_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/timing.h" #include <mgba/core/timing.h>
#include "third-party/blip_buf/blip_buf.h"
DECL_BITFIELD(GBAudioRegisterDuty, uint8_t); DECL_BITFIELD(GBAudioRegisterDuty, uint8_t);
DECL_BITS(GBAudioRegisterDuty, Length, 0, 6); DECL_BITS(GBAudioRegisterDuty, Length, 0, 6);
@ -157,8 +156,8 @@ struct GBAudio {
struct GBAudioWaveChannel ch3; struct GBAudioWaveChannel ch3;
struct GBAudioNoiseChannel ch4; struct GBAudioNoiseChannel ch4;
blip_t* left; struct blip_t* left;
blip_t* right; struct blip_t* right;
int16_t lastLeft; int16_t lastLeft;
int16_t lastRight; int16_t lastRight;
int clock; int clock;

View File

@ -6,12 +6,12 @@
#ifndef GB_CHEATS_H #ifndef GB_CHEATS_H
#define GB_CHEATS_H #define GB_CHEATS_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/cheats.h" #include <mgba/core/cheats.h>
#include "util/vector.h" #include <mgba-util/vector.h>
enum GBCheatType { enum GBCheatType {
GB_CHEAT_AUTODETECT, GB_CHEAT_AUTODETECT,

View File

@ -6,11 +6,11 @@
#ifndef GB_CLI_H #ifndef GB_CLI_H
#define GB_CLI_H #define GB_CLI_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "debugger/cli-debugger.h" #include <mgba/internal/debugger/cli-debugger.h>
struct GBCLIDebugger { struct GBCLIDebugger {
struct CLIDebuggerSystem d; struct CLIDebuggerSystem d;

View File

@ -6,21 +6,19 @@
#ifndef GB_H #ifndef GB_H
#define GB_H #define GB_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/log.h" #include <mgba/core/cpu.h>
#include "core/timing.h" #include <mgba/core/log.h>
#include <mgba/core/timing.h>
#include "lr35902/lr35902.h" #include <mgba/internal/gb/audio.h>
#include <mgba/internal/gb/memory.h>
#include "gb/audio.h" #include <mgba/internal/gb/sio.h>
#include "gb/interface.h" #include <mgba/internal/gb/timer.h>
#include "gb/memory.h" #include <mgba/internal/gb/video.h>
#include "gb/sio.h"
#include "gb/timer.h"
#include "gb/video.h"
extern const uint32_t DMG_LR35902_FREQUENCY; extern const uint32_t DMG_LR35902_FREQUENCY;
extern const uint32_t CGB_LR35902_FREQUENCY; extern const uint32_t CGB_LR35902_FREQUENCY;
@ -45,6 +43,7 @@ enum GBIRQVector {
GB_VECTOR_KEYPAD = 0x60, GB_VECTOR_KEYPAD = 0x60,
}; };
struct LR35902Core;
struct mCoreSync; struct mCoreSync;
struct mAVStream; struct mAVStream;
struct mCoreCallbacks; struct mCoreCallbacks;

View File

@ -6,11 +6,11 @@
#ifndef GB_IO_H #ifndef GB_IO_H
#define GB_IO_H #define GB_IO_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/log.h" #include <mgba/core/log.h>
mLOG_DECLARE_CATEGORY(GB_IO); mLOG_DECLARE_CATEGORY(GB_IO);

View File

@ -6,11 +6,11 @@
#ifndef GB_MBC_H #ifndef GB_MBC_H
#define GB_MBC_H #define GB_MBC_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/log.h" #include <mgba/core/log.h>
mLOG_DECLARE_CATEGORY(GB_MBC); mLOG_DECLARE_CATEGORY(GB_MBC);

View File

@ -6,14 +6,13 @@
#ifndef GB_MEMORY_H #ifndef GB_MEMORY_H
#define GB_MEMORY_H #define GB_MEMORY_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/log.h" #include <mgba/core/log.h>
#include "core/timing.h" #include <mgba/core/timing.h>
#include "gb/interface.h" #include <mgba/gb/interface.h>
#include "lr35902/lr35902.h"
#include <time.h> #include <time.h>
@ -154,6 +153,7 @@ struct GBMemory {
struct mRumble* rumble; struct mRumble* rumble;
}; };
struct LR35902Core;
void GBMemoryInit(struct GB* gb); void GBMemoryInit(struct GB* gb);
void GBMemoryDeinit(struct GB* gb); void GBMemoryDeinit(struct GB* gb);

View File

@ -6,11 +6,11 @@
#ifndef GB_OVERRIDES_H #ifndef GB_OVERRIDES_H
#define GB_OVERRIDES_H #define GB_OVERRIDES_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "gb/interface.h" #include <mgba/gb/interface.h>
struct GBCartridgeOverride { struct GBCartridgeOverride {
int headerCrc32; int headerCrc32;

View File

@ -6,13 +6,13 @@
#ifndef GB_RENDERER_SOFTWARE_H #ifndef GB_RENDERER_SOFTWARE_H
#define GB_RENDERER_SOFTWARE_H #define GB_RENDERER_SOFTWARE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/core.h" #include <mgba/core/core.h>
#include "gb/gb.h" #include <mgba/internal/gb/gb.h>
#include "gb/video.h" #include <mgba/internal/gb/video.h>
struct GBVideoSoftwareRenderer { struct GBVideoSoftwareRenderer {
struct GBVideoRenderer d; struct GBVideoRenderer d;

View File

@ -6,7 +6,7 @@
#ifndef GB_TILE_CACHE_H #ifndef GB_TILE_CACHE_H
#define GB_TILE_CACHE_H #define GB_TILE_CACHE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,12 +6,12 @@
#ifndef GB_SERIALIZE_H #ifndef GB_SERIALIZE_H
#define GB_SERIALIZE_H #define GB_SERIALIZE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/core.h" #include <mgba/core/core.h>
#include "gb/gb.h" #include <mgba/internal/gb/gb.h>
extern const uint32_t GB_SAVESTATE_MAGIC; extern const uint32_t GB_SAVESTATE_MAGIC;
extern const uint32_t GB_SAVESTATE_VERSION; extern const uint32_t GB_SAVESTATE_VERSION;

View File

@ -6,12 +6,12 @@
#ifndef GB_SIO_H #ifndef GB_SIO_H
#define GB_SIO_H #define GB_SIO_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/log.h" #include <mgba/core/log.h>
#include "core/timing.h" #include <mgba/core/timing.h>
#define MAX_GBS 2 #define MAX_GBS 2

View File

@ -6,13 +6,13 @@
#ifndef GB_SIO_LOCKSTEP_H #ifndef GB_SIO_LOCKSTEP_H
#define GB_SIO_LOCKSTEP_H #define GB_SIO_LOCKSTEP_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/lockstep.h" #include <mgba/core/lockstep.h>
#include "core/timing.h" #include <mgba/core/timing.h>
#include "gb/sio.h" #include <mgba/internal/gb/sio.h>
struct GBSIOLockstep { struct GBSIOLockstep {
struct mLockstep d; struct mLockstep d;

View File

@ -6,11 +6,11 @@
#ifndef GB_TIMER_H #ifndef GB_TIMER_H
#define GB_TIMER_H #define GB_TIMER_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/timing.h" #include <mgba/core/timing.h>
DECL_BITFIELD(GBRegisterTAC, uint8_t); DECL_BITFIELD(GBRegisterTAC, uint8_t);
DECL_BITS(GBRegisterTAC, Clock, 0, 2); DECL_BITS(GBRegisterTAC, Clock, 0, 2);

View File

@ -6,14 +6,12 @@
#ifndef GB_VIDEO_H #ifndef GB_VIDEO_H
#define GB_VIDEO_H #define GB_VIDEO_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/interface.h" #include <mgba/core/timing.h>
#include "core/timing.h" #include <mgba/gb/interface.h>
#include "gb/interface.h"
#include "gb/memory.h"
enum { enum {
GB_VIDEO_HORIZONTAL_PIXELS = 160, GB_VIDEO_HORIZONTAL_PIXELS = 160,
@ -55,7 +53,6 @@ union GBOAM {
uint8_t raw[160]; uint8_t raw[160];
}; };
enum GBModel;
struct mTileCache; struct mTileCache;
struct GBVideoRenderer { struct GBVideoRenderer {
void (*init)(struct GBVideoRenderer* renderer, enum GBModel model); void (*init)(struct GBVideoRenderer* renderer, enum GBModel model);

View File

@ -6,13 +6,13 @@
#ifndef GBA_AUDIO_H #ifndef GBA_AUDIO_H
#define GBA_AUDIO_H #define GBA_AUDIO_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/log.h" #include <mgba/core/log.h>
#include "gb/audio.h" #include <mgba/internal/gb/audio.h>
#include "util/circle-buffer.h" #include <mgba-util/circle-buffer.h>
mLOG_DECLARE_CATEGORY(GBA_AUDIO); mLOG_DECLARE_CATEGORY(GBA_AUDIO);

View File

@ -6,15 +6,15 @@
#ifndef GBA_BIOS_H #ifndef GBA_BIOS_H
#define GBA_BIOS_H #define GBA_BIOS_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "arm/arm.h" #include <mgba/core/log.h>
#include "core/log.h"
mLOG_DECLARE_CATEGORY(GBA_BIOS); mLOG_DECLARE_CATEGORY(GBA_BIOS);
struct ARMCore;
void GBASwi16(struct ARMCore* cpu, int immediate); void GBASwi16(struct ARMCore* cpu, int immediate);
void GBASwi32(struct ARMCore* cpu, int immediate); void GBASwi32(struct ARMCore* cpu, int immediate);

View File

@ -6,12 +6,12 @@
#ifndef GBA_CHEATS_H #ifndef GBA_CHEATS_H
#define GBA_CHEATS_H #define GBA_CHEATS_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "arm/arm.h" #include <mgba/internal/arm/arm.h>
#include "core/cheats.h" #include <mgba/core/cheats.h>
#define MAX_ROM_PATCHES 4 #define MAX_ROM_PATCHES 4
#define COMPLETE ((size_t) -1) #define COMPLETE ((size_t) -1)

View File

@ -6,7 +6,7 @@
#ifndef GBA_DMA_H #ifndef GBA_DMA_H
#define GBA_DMA_H #define GBA_DMA_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START

View File

@ -6,11 +6,11 @@
#ifndef GBA_CLI_H #ifndef GBA_CLI_H
#define GBA_CLI_H #define GBA_CLI_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "debugger/cli-debugger.h" #include <mgba/internal/debugger/cli-debugger.h>
struct mCore; struct mCore;

View File

@ -6,20 +6,18 @@
#ifndef GBA_H #ifndef GBA_H
#define GBA_H #define GBA_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "arm/arm.h" #include <mgba/core/log.h>
#include "core/log.h" #include <mgba/core/timing.h>
#include "core/timing.h"
#include "gba/interface.h" #include <mgba/internal/gba/memory.h>
#include "gba/memory.h" #include <mgba/internal/gba/video.h>
#include "gba/video.h" #include <mgba/internal/gba/audio.h>
#include "gba/audio.h" #include <mgba/internal/gba/sio.h>
#include "gba/sio.h" #include <mgba/internal/gba/timer.h>
#include "gba/timer.h"
#define GBA_ARM7TDMI_FREQUENCY 0x1000000U #define GBA_ARM7TDMI_FREQUENCY 0x1000000U
@ -52,6 +50,7 @@ enum {
SP_BASE_SUPERVISOR = 0x03007FE0 SP_BASE_SUPERVISOR = 0x03007FE0
}; };
struct ARMCore;
struct GBA; struct GBA;
struct Patch; struct Patch;
struct VFile; struct VFile;

View File

@ -6,14 +6,13 @@
#ifndef GBA_HARDWARE_H #ifndef GBA_HARDWARE_H
#define GBA_HARDWARE_H #define GBA_HARDWARE_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "arm/macros.h" #include <mgba/core/log.h>
#include "core/log.h" #include <mgba/core/timing.h>
#include "core/timing.h" #include <mgba/gba/interface.h>
#include "gba/interface.h"
#include <time.h> #include <time.h>

View File

@ -6,11 +6,11 @@
#ifndef GBA_INPUT_H #ifndef GBA_INPUT_H
#define GBA_INPUT_H #define GBA_INPUT_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "core/input.h" #include <mgba/core/input.h>
extern const struct mInputPlatformInfo GBAInputInfo; extern const struct mInputPlatformInfo GBAInputInfo;

View File

@ -6,11 +6,11 @@
#ifndef GBA_IO_H #ifndef GBA_IO_H
#define GBA_IO_H #define GBA_IO_H
#include "util/common.h" #include <mgba-util/common.h>
CXX_GUARD_START CXX_GUARD_START
#include "gba/gba.h" #include <mgba/core/log.h>
enum GBAIORegisters { enum GBAIORegisters {
// Video // Video
@ -163,6 +163,7 @@ mLOG_DECLARE_CATEGORY(GBA_IO);
extern const char* const GBAIORegisterNames[]; extern const char* const GBAIORegisterNames[];
struct GBA;
void GBAIOInit(struct GBA* gba); void GBAIOInit(struct GBA* gba);
void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value); void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value);
void GBAIOWrite8(struct GBA* gba, uint32_t address, uint8_t value); void GBAIOWrite8(struct GBA* gba, uint32_t address, uint8_t value);

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