From fa884d071ecaa3e05ff20b45a67bf9500dd3d6b6 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 30 Dec 2016 17:00:22 -0800 Subject: [PATCH] All: Migrate includes to separate directory --- CMakeLists.txt | 4 +-- {src/util => include/mgba-util}/arm-algo.h | 0 .../mgba-util}/circle-buffer.h | 2 +- {src/util => include/mgba-util}/common.h | 0 .../mgba-util}/configuration.h | 4 +-- {src/util => include/mgba-util}/crc32.h | 2 +- {src/util => include/mgba-util}/export.h | 2 +- {src/util => include/mgba-util}/formatting.h | 2 +- {src/util => include/mgba-util}/gui.h | 7 ++-- .../mgba-util}/gui/file-select.h | 4 +-- .../mgba-util}/gui/font-metrics.h | 2 +- {src/util => include/mgba-util}/gui/font.h | 2 +- {src/util => include/mgba-util}/gui/menu.h | 4 +-- {src/util => include/mgba-util}/hash.h | 2 +- {src/util => include/mgba-util}/math.h | 2 +- {src/util => include/mgba-util}/memory.h | 2 +- {src/util => include/mgba-util}/nointro.h | 2 +- {src/util => include/mgba-util}/patch.h | 2 +- .../mgba-util/patch/fast.h | 6 ++-- .../mgba-util/patch/ips.h | 2 +- .../mgba-util/patch/ups.h | 2 +- .../mgba-util}/platform/3ds/3ds-vfs.h | 2 +- .../mgba-util}/platform/3ds/threading.h | 2 +- .../mgba-util}/platform/posix/threading.h | 2 +- .../mgba-util}/platform/psp2/sce-vfs.h | 0 .../mgba-util}/platform/psp2/threading.h | 0 .../mgba-util}/platform/windows/getopt.h | 0 .../mgba-util}/platform/windows/threading.h | 2 +- {src/util => include/mgba-util}/png-io.h | 2 +- {src/util => include/mgba-util}/ring-fifo.h | 2 +- {src/util => include/mgba-util}/socket.h | 2 +- {src/util => include/mgba-util}/string.h | 2 +- {src/util => include/mgba-util}/table.h | 2 +- {src/util => include/mgba-util}/text-codec.h | 2 +- {src/util => include/mgba-util}/threading.h | 10 +++--- {src/util => include/mgba-util}/vector.h | 2 +- {src/util => include/mgba-util}/vfs.h | 4 +-- .../blip_buf => include/mgba/core}/blip_buf.h | 0 {src => include/mgba}/core/cheats.h | 8 ++--- {src => include/mgba}/core/config.h | 4 +-- {src => include/mgba}/core/core.h | 13 +++---- {src => include/mgba}/core/cpu.h | 2 +- {src => include/mgba}/core/directories.h | 2 +- {src => include/mgba}/core/input.h | 2 +- {src => include/mgba}/core/interface.h | 2 +- {src => include/mgba}/core/library.h | 6 ++-- {src => include/mgba}/core/lockstep.h | 2 +- {src => include/mgba}/core/log.h | 2 +- {src => include/mgba}/core/rewind.h | 4 +-- {src => include/mgba}/core/serialize.h | 2 +- {src => include/mgba}/core/sync.h | 4 +-- {src => include/mgba}/core/thread.h | 10 +++--- {src => include/mgba}/core/tile-cache.h | 2 +- {src => include/mgba}/core/timing.h | 2 +- {src => include/mgba}/core/version.h | 0 {src => include/mgba}/gb/core.h | 2 +- {src => include/mgba}/gb/interface.h | 2 +- {src => include/mgba}/gba/core.h | 2 +- {src => include/mgba}/gba/interface.h | 4 +-- {src => include/mgba/internal}/arm/arm.h | 4 +-- .../internal}/arm/debugger/cli-debugger.h | 2 +- .../mgba/internal}/arm/debugger/debugger.h | 6 ++-- .../internal}/arm/debugger/memory-debugger.h | 2 +- .../mgba/internal}/arm/decoder-inlines.h | 0 {src => include/mgba/internal}/arm/decoder.h | 4 +-- .../mgba/internal}/arm/emitter-arm.h | 0 .../mgba/internal}/arm/emitter-inlines.h | 0 .../mgba/internal}/arm/emitter-thumb.h | 0 {src => include/mgba/internal}/arm/isa-arm.h | 2 +- .../mgba/internal}/arm/isa-inlines.h | 0 .../mgba/internal}/arm/isa-thumb.h | 2 +- {src => include/mgba/internal}/arm/macros.h | 2 +- .../mgba/internal}/debugger/cli-debugger.h | 4 +-- .../mgba/internal}/debugger/debugger.h | 8 ++--- .../mgba/internal}/debugger/gdb-stub.h | 6 ++-- .../mgba/internal}/debugger/parser.h | 4 +-- {src => include/mgba/internal}/gb/audio.h | 9 +++-- {src => include/mgba/internal}/gb/cheats.h | 6 ++-- {src => include/mgba/internal}/gb/extra/cli.h | 4 +-- {src => include/mgba/internal}/gb/gb.h | 21 ++++++------ {src => include/mgba/internal}/gb/io.h | 4 +-- {src => include/mgba/internal}/gb/mbc.h | 4 +-- {src => include/mgba/internal}/gb/memory.h | 10 +++--- {src => include/mgba/internal}/gb/overrides.h | 4 +-- .../mgba/internal}/gb/renderers/software.h | 8 ++--- .../mgba/internal}/gb/renderers/tile-cache.h | 2 +- {src => include/mgba/internal}/gb/serialize.h | 6 ++-- {src => include/mgba/internal}/gb/sio.h | 6 ++-- .../mgba/internal}/gb/sio/lockstep.h | 8 ++--- {src => include/mgba/internal}/gb/timer.h | 4 +-- {src => include/mgba/internal}/gb/video.h | 9 ++--- {src => include/mgba/internal}/gba/audio.h | 8 ++--- {src => include/mgba/internal}/gba/bios.h | 6 ++-- {src => include/mgba/internal}/gba/cheats.h | 6 ++-- {src => include/mgba/internal}/gba/dma.h | 2 +- .../mgba/internal}/gba/extra/cli.h | 4 +-- {src => include/mgba/internal}/gba/gba.h | 19 +++++------ {src => include/mgba/internal}/gba/hardware.h | 9 +++-- {src => include/mgba/internal}/gba/input.h | 4 +-- {src => include/mgba/internal}/gba/io.h | 5 +-- {src => include/mgba/internal}/gba/memory.h | 13 +++---- .../mgba/internal}/gba/overrides.h | 4 +-- .../internal}/gba/renderers/thread-proxy.h | 8 ++--- .../mgba/internal}/gba/renderers/tile-cache.h | 2 +- .../internal}/gba/renderers/video-software.h | 6 ++-- {src => include/mgba/internal}/gba/rr/mgm.h | 4 +-- {src => include/mgba/internal}/gba/rr/rr.h | 6 ++-- {src => include/mgba/internal}/gba/rr/vbm.h | 4 +-- {src => include/mgba/internal}/gba/savedata.h | 4 +-- .../mgba/internal}/gba/serialize.h | 8 ++--- .../mgba/internal}/gba/sharkport.h | 2 +- {src => include/mgba/internal}/gba/sio.h | 6 ++-- .../mgba/internal}/gba/sio/lockstep.h | 8 ++--- {src => include/mgba/internal}/gba/timer.h | 4 +-- {src => include/mgba/internal}/gba/vfame.h | 2 +- {src => include/mgba/internal}/gba/video.h | 6 ++-- .../internal}/lr35902/debugger/cli-debugger.h | 2 +- .../internal}/lr35902/debugger/debugger.h | 4 +-- .../mgba/internal}/lr35902/emitter-lr35902.h | 0 .../mgba/internal}/lr35902/isa-lr35902.h | 2 +- .../mgba/internal}/lr35902/lr35902.h | 6 ++-- src/arm/arm.c | 8 ++--- src/arm/debugger/cli-debugger.c | 12 +++---- src/arm/debugger/debugger.c | 10 +++--- src/arm/debugger/memory-debugger.c | 6 ++-- src/arm/decoder-arm.c | 8 ++--- src/arm/decoder-thumb.c | 8 ++--- src/arm/decoder.c | 4 +-- src/arm/isa-arm.c | 8 ++--- src/arm/isa-thumb.c | 6 ++-- src/core/cheats.c | 8 ++--- src/core/config.c | 12 +++---- src/core/core.c | 19 ++++++----- src/core/directories.c | 6 ++-- src/core/input.c | 6 ++-- src/core/interface.c | 4 +-- src/core/library.c | 4 +-- src/core/lockstep.c | 2 +- src/core/log.c | 4 +-- src/core/rewind.c | 8 ++--- src/core/serialize.c | 12 +++---- src/core/sync.c | 2 +- src/core/test/core.c | 4 +-- src/core/test/core.h | 2 +- src/core/thread.c | 10 +++--- src/core/tile-cache.c | 4 +-- src/core/timing.c | 2 +- src/core/version.c.in | 2 +- src/debugger/cli-debugger.c | 10 +++--- src/debugger/debugger.c | 8 ++--- src/debugger/gdb-stub.c | 10 +++--- src/debugger/parser.c | 4 +-- src/feature/commandline.c | 8 ++--- src/feature/commandline.h | 4 +-- src/feature/editline/cli-el-backend.c | 2 +- src/feature/editline/cli-el-backend.h | 4 +-- src/feature/ffmpeg/ffmpeg-encoder.c | 4 +-- src/feature/ffmpeg/ffmpeg-encoder.h | 4 +-- src/feature/gui/gui-config.c | 10 +++--- src/feature/gui/gui-config.h | 2 +- src/feature/gui/gui-runner.c | 22 ++++++------ src/feature/gui/gui-runner.h | 10 +++--- src/feature/gui/remap.c | 4 +-- src/feature/gui/remap.h | 2 +- .../imagemagick/imagemagick-gif-encoder.c | 6 ++-- .../imagemagick/imagemagick-gif-encoder.h | 4 +-- src/gb/audio.c | 13 +++---- src/gb/cheats.c | 10 +++--- src/gb/core.c | 29 ++++++++-------- src/gb/extra/cli.c | 14 ++++---- src/gb/gb.c | 21 ++++++------ src/gb/io.c | 8 ++--- src/gb/mbc.c | 9 ++--- src/gb/memory.c | 15 ++++---- src/gb/overrides.c | 8 ++--- src/gb/renderers/software.c | 8 ++--- src/gb/renderers/tile-cache.c | 8 ++--- src/gb/serialize.c | 7 ++-- src/gb/sio.c | 8 ++--- src/gb/sio/lockstep.c | 6 ++-- src/gb/test/core.c | 8 ++--- src/gb/test/gb.h | 2 +- src/gb/test/mbc.c | 10 +++--- src/gb/test/memory.c | 10 +++--- src/gb/test/rtc.c | 10 +++--- src/gb/timer.c | 8 ++--- src/gb/video.c | 17 +++++----- src/gba/audio.c | 16 +++++---- src/gba/bios.c | 12 +++---- src/gba/cheats.c | 8 ++--- src/gba/cheats/codebreaker.c | 8 ++--- src/gba/cheats/gameshark.c | 6 ++-- src/gba/cheats/gameshark.h | 5 ++- src/gba/cheats/parv3.c | 6 ++-- src/gba/cheats/parv3.h | 5 ++- src/gba/core.c | 30 ++++++++-------- src/gba/dma.c | 6 ++-- src/gba/extra/cli.c | 12 ++++--- src/gba/gba.c | 34 ++++++++----------- src/gba/hardware.c | 11 +++--- src/gba/hle-bios.c | 2 +- src/gba/hle-bios.h | 2 +- src/gba/hle-bios.make | 2 +- src/gba/input.c | 4 +-- src/gba/io.c | 12 +++---- src/gba/memory.c | 20 ++++++----- src/gba/overrides.c | 8 ++--- src/gba/renderers/software-bg.c | 4 +-- src/gba/renderers/software-mode0.c | 4 +-- src/gba/renderers/software-obj.c | 2 +- src/gba/renderers/software-private.h | 3 +- src/gba/renderers/thread-proxy.c | 10 +++--- src/gba/renderers/tile-cache.c | 7 ++-- src/gba/renderers/video-software.c | 13 ++++--- src/gba/rr/mgm.c | 8 ++--- src/gba/rr/rr.c | 7 ++-- src/gba/rr/vbm.c | 8 ++--- src/gba/savedata.c | 11 +++--- src/gba/serialize.c | 15 ++++---- src/gba/sharkport.c | 7 ++-- src/gba/sio.c | 5 +-- src/gba/sio/lockstep.c | 7 ++-- src/gba/test/core.c | 4 +-- src/gba/test/gba.h | 2 +- src/gba/timer.c | 6 ++-- src/gba/vfame.c | 6 ++-- src/gba/video.c | 19 +++++------ src/lr35902/debugger/cli-debugger.c | 8 ++--- src/lr35902/debugger/debugger.c | 6 ++-- src/lr35902/isa-lr35902.c | 6 ++-- src/lr35902/lr35902.c | 4 +-- src/platform/3ds/3ds-memory.c | 2 +- src/platform/3ds/3ds-vfs.c | 6 ++-- src/platform/3ds/ctru-heap.c | 2 +- src/platform/3ds/gui-font.c | 8 ++--- src/platform/3ds/main.c | 23 +++++++------ src/platform/3ds/socket.c | 2 +- src/platform/example/client-server/client.c | 6 ++-- src/platform/example/client-server/server.c | 4 +-- src/platform/libretro/libretro.c | 34 +++++++++---------- src/platform/openemu/mGBAGameCore.m | 27 ++++++++------- src/platform/opengl/gl.c | 2 +- src/platform/opengl/gl.h | 2 +- src/platform/opengl/gles2.c | 10 +++--- src/platform/opengl/gles2.h | 2 +- src/platform/posix/memory.c | 2 +- src/platform/psp2/gui-font.c | 6 ++-- src/platform/psp2/main.c | 10 +++--- src/platform/psp2/psp2-common.h | 2 +- src/platform/psp2/psp2-context.c | 22 ++++++------ src/platform/psp2/psp2-context.h | 4 +-- src/platform/psp2/psp2-memory.c | 4 +-- src/platform/psp2/sce-vfs.c | 6 ++-- src/platform/python/_builder.h | 22 ++++++------ src/platform/python/_builder.py | 31 +++++++++-------- src/platform/python/log.c | 4 +-- src/platform/python/log.h | 2 +- src/platform/python/vfs-py.c | 2 +- src/platform/python/vfs-py.h | 4 +-- src/platform/qt/AboutScreen.cpp | 2 +- src/platform/qt/ArchiveInspector.cpp | 2 +- src/platform/qt/AssetTile.cpp | 6 ++-- src/platform/qt/AssetTile.h | 2 +- src/platform/qt/AssetView.cpp | 4 --- src/platform/qt/AudioDevice.cpp | 7 ++-- src/platform/qt/AudioProcessorQt.cpp | 4 +-- src/platform/qt/AudioProcessorSDL.cpp | 2 +- src/platform/qt/CheatsModel.cpp | 3 +- src/platform/qt/CheatsView.cpp | 6 ++-- src/platform/qt/ConfigController.h | 4 +-- src/platform/qt/DebuggerConsoleController.cpp | 2 +- src/platform/qt/DebuggerConsoleController.h | 2 +- src/platform/qt/Display.cpp | 4 +-- src/platform/qt/Display.h | 2 +- src/platform/qt/DisplayGL.cpp | 4 +-- src/platform/qt/DisplayQt.cpp | 4 +-- src/platform/qt/GBAApp.cpp | 11 +++--- src/platform/qt/GBAApp.h | 3 +- src/platform/qt/GBAKeyEditor.h | 2 +- src/platform/qt/GBAOverride.cpp | 2 +- src/platform/qt/GBAOverride.h | 2 +- src/platform/qt/GBOverride.cpp | 6 ++-- src/platform/qt/GBOverride.h | 2 +- src/platform/qt/GDBController.h | 2 +- src/platform/qt/GIFView.cpp | 3 ++ src/platform/qt/GameController.cpp | 25 +++++++------- src/platform/qt/GameController.h | 10 +++--- src/platform/qt/GamepadAxisEvent.h | 2 +- src/platform/qt/GamepadButtonEvent.h | 2 +- src/platform/qt/IOViewer.cpp | 6 ++-- src/platform/qt/InputController.cpp | 4 +-- src/platform/qt/InputController.h | 2 +- src/platform/qt/InputProfile.h | 2 +- src/platform/qt/LibraryModel.cpp | 2 +- src/platform/qt/LibraryModel.h | 2 +- src/platform/qt/LoadSaveState.cpp | 8 ++--- src/platform/qt/LogController.h | 2 -- src/platform/qt/MemoryModel.cpp | 3 +- src/platform/qt/MemoryModel.h | 2 +- src/platform/qt/MemoryView.cpp | 6 ++-- src/platform/qt/MessagePainter.cpp | 2 +- src/platform/qt/MultiplayerController.cpp | 4 +-- src/platform/qt/MultiplayerController.h | 6 ++-- src/platform/qt/ObjView.cpp | 6 ++-- src/platform/qt/ObjView.h | 2 +- src/platform/qt/OverrideView.cpp | 4 +-- src/platform/qt/OverrideView.h | 2 +- src/platform/qt/PaletteView.cpp | 12 +++---- src/platform/qt/ROMInfo.cpp | 8 ++--- src/platform/qt/SensorView.cpp | 4 +-- src/platform/qt/SettingsView.cpp | 4 +-- src/platform/qt/ShaderSelector.cpp | 3 +- src/platform/qt/Swatch.cpp | 2 +- src/platform/qt/TileView.cpp | 2 +- src/platform/qt/TileView.h | 2 +- src/platform/qt/VFileDevice.cpp | 2 ++ src/platform/qt/VFileDevice.h | 3 +- src/platform/qt/VideoView.cpp | 4 --- src/platform/qt/Window.cpp | 9 ++--- src/platform/qt/Window.h | 3 +- src/platform/sdl/gl-common.c | 2 +- src/platform/sdl/gl-common.h | 2 +- src/platform/sdl/gl-sdl.c | 4 +-- src/platform/sdl/main.c | 28 +++++---------- src/platform/sdl/main.h | 10 +----- src/platform/sdl/sdl-audio.c | 9 ++--- src/platform/sdl/sdl-audio.h | 4 +-- src/platform/sdl/sdl-events.c | 21 +++++------- src/platform/sdl/sdl-events.h | 10 +++--- src/platform/test/fuzz-main.c | 20 ++++++----- src/platform/test/perf-main.c | 18 +++++----- src/platform/test/tbl-fuzz-main.c | 4 +-- src/platform/video-backend.h | 2 +- src/platform/wii/gui-font.c | 4 +-- src/platform/wii/main.c | 21 ++++++------ src/platform/wii/wii-memory.c | 2 +- src/platform/windows/vfs-w32.c | 4 +-- src/third-party/blip_buf/blip_buf.c | 2 +- src/util/circle-buffer.c | 2 +- src/util/configuration.c | 8 ++--- src/util/crc32.c | 4 +-- src/util/export.c | 6 ++-- src/util/formatting.c | 2 +- src/util/gui.c | 2 +- src/util/gui/file-select.c | 8 ++--- src/util/gui/font-metrics.c | 2 +- src/util/gui/font.c | 4 +-- src/util/gui/menu.c | 6 ++-- src/util/hash.c | 2 +- src/util/nointro.c | 9 +++-- src/util/patch-fast.c | 2 +- src/util/patch-ips.c | 6 ++-- src/util/patch-ups.c | 8 ++--- src/util/patch.c | 6 ++-- src/util/png-io.c | 4 +-- src/util/ring-fifo.c | 4 +-- src/util/string.c | 2 +- src/util/table.c | 6 ++-- src/util/test/suite.h | 2 +- src/util/test/text-codec.c | 4 +-- src/util/test/util.h | 2 +- src/util/test/vfs.c | 2 +- src/util/text-codec.c | 8 ++--- src/util/vfs.c | 8 ++--- src/util/vfs/vfs-devlist.c | 2 +- src/util/vfs/vfs-dirent.c | 4 +-- src/util/vfs/vfs-fd.c | 2 +- src/util/vfs/vfs-file.c | 4 +-- src/util/vfs/vfs-lzma.c | 4 +-- src/util/vfs/vfs-mem.c | 4 +-- src/util/vfs/vfs-zip.c | 6 ++-- 371 files changed, 1099 insertions(+), 1111 deletions(-) rename {src/util => include/mgba-util}/arm-algo.h (100%) rename {src/util => include/mgba-util}/circle-buffer.h (97%) rename {src/util => include/mgba-util}/common.h (100%) rename {src/util => include/mgba-util}/configuration.h (96%) rename {src/util => include/mgba-util}/crc32.h (94%) rename {src/util => include/mgba-util}/export.h (94%) rename {src/util => include/mgba-util}/formatting.h (96%) rename {src/util => include/mgba-util}/gui.h (93%) rename {src/util => include/mgba-util}/gui/file-select.h (88%) rename {src/util => include/mgba-util}/gui/font-metrics.h (92%) rename {src/util => include/mgba-util}/gui/font.h (98%) rename {src/util => include/mgba-util}/gui/menu.h (95%) rename {src/util => include/mgba-util}/hash.h (92%) rename {src/util => include/mgba-util}/math.h (98%) rename {src/util => include/mgba-util}/memory.h (93%) rename {src/util => include/mgba-util}/nointro.h (96%) rename {src/util => include/mgba-util}/patch.h (95%) rename src/util/patch-fast.h => include/mgba-util/patch/fast.h (89%) rename src/util/patch-ips.h => include/mgba-util/patch/ips.h (92%) rename src/util/patch-ups.h => include/mgba-util/patch/ups.h (92%) rename {src => include/mgba-util}/platform/3ds/3ds-vfs.h (94%) rename {src => include/mgba-util}/platform/3ds/threading.h (98%) rename {src => include/mgba-util}/platform/posix/threading.h (98%) rename {src => include/mgba-util}/platform/psp2/sce-vfs.h (100%) rename {src => include/mgba-util}/platform/psp2/threading.h (100%) rename {src => include/mgba-util}/platform/windows/getopt.h (100%) rename {src => include/mgba-util}/platform/windows/threading.h (98%) rename {src/util => include/mgba-util}/png-io.h (97%) rename {src/util => include/mgba-util}/ring-fifo.h (96%) rename {src/util => include/mgba-util}/socket.h (99%) rename {src/util => include/mgba-util}/string.h (97%) rename {src/util => include/mgba-util}/table.h (97%) rename {src/util => include/mgba-util}/text-codec.h (97%) rename {src/util => include/mgba-util}/threading.h (87%) rename {src/util => include/mgba-util}/vector.h (99%) rename {src/util => include/mgba-util}/vfs.h (97%) rename {src/third-party/blip_buf => include/mgba/core}/blip_buf.h (100%) rename {src => include/mgba}/core/cheats.h (95%) rename {src => include/mgba}/core/config.h (98%) rename {src => include/mgba}/core/core.h (95%) rename {src => include/mgba}/core/cpu.h (95%) rename {src => include/mgba}/core/directories.h (97%) rename {src => include/mgba}/core/input.h (98%) rename {src => include/mgba}/core/interface.h (98%) rename {src => include/mgba}/core/library.h (90%) rename {src => include/mgba}/core/lockstep.h (96%) rename {src => include/mgba}/core/log.h (97%) rename {src => include/mgba}/core/rewind.h (93%) rename {src => include/mgba}/core/serialize.h (97%) rename {src => include/mgba}/core/sync.h (94%) rename {src => include/mgba}/core/thread.h (95%) rename {src => include/mgba}/core/tile-cache.h (98%) rename {src => include/mgba}/core/timing.h (97%) rename {src => include/mgba}/core/version.h (100%) rename {src => include/mgba}/gb/core.h (92%) rename {src => include/mgba}/gb/interface.h (96%) rename {src => include/mgba}/gba/core.h (92%) rename {src => include/mgba}/gba/interface.h (94%) rename {src => include/mgba/internal}/arm/arm.h (98%) rename {src => include/mgba/internal}/arm/debugger/cli-debugger.h (93%) rename {src => include/mgba/internal}/arm/debugger/debugger.h (93%) rename {src => include/mgba/internal}/arm/debugger/memory-debugger.h (94%) rename {src => include/mgba/internal}/arm/decoder-inlines.h (100%) rename {src => include/mgba/internal}/arm/decoder.h (98%) rename {src => include/mgba/internal}/arm/emitter-arm.h (100%) rename {src => include/mgba/internal}/arm/emitter-inlines.h (100%) rename {src => include/mgba/internal}/arm/emitter-thumb.h (100%) rename {src => include/mgba/internal}/arm/isa-arm.h (94%) rename {src => include/mgba/internal}/arm/isa-inlines.h (100%) rename {src => include/mgba/internal}/arm/isa-thumb.h (93%) rename {src => include/mgba/internal}/arm/macros.h (93%) rename {src => include/mgba/internal}/debugger/cli-debugger.h (97%) rename {src => include/mgba/internal}/debugger/debugger.h (95%) rename {src => include/mgba/internal}/debugger/gdb-stub.h (90%) rename {src => include/mgba/internal}/debugger/parser.h (94%) rename {src => include/mgba/internal}/gb/audio.h (98%) rename {src => include/mgba/internal}/gb/cheats.h (89%) rename {src => include/mgba/internal}/gb/extra/cli.h (86%) rename {src => include/mgba/internal}/gb/gb.h (90%) rename {src => include/mgba/internal}/gb/io.h (97%) rename {src => include/mgba/internal}/gb/mbc.h (94%) rename {src => include/mgba/internal}/gb/memory.h (96%) rename {src => include/mgba/internal}/gb/overrides.h (92%) rename {src => include/mgba/internal}/gb/renderers/software.h (85%) rename {src => include/mgba/internal}/gb/renderers/tile-cache.h (94%) rename {src => include/mgba/internal}/gb/serialize.h (99%) rename {src => include/mgba/internal}/gb/sio.h (93%) rename {src => include/mgba/internal}/gb/sio/lockstep.h (88%) rename {src => include/mgba/internal}/gb/timer.h (94%) rename {src => include/mgba/internal}/gb/video.h (96%) rename {src => include/mgba/internal}/gba/audio.h (96%) rename {src => include/mgba/internal}/gba/bios.h (89%) rename {src => include/mgba/internal}/gba/cheats.h (97%) rename {src => include/mgba/internal}/gba/dma.h (96%) rename {src => include/mgba/internal}/gba/extra/cli.h (86%) rename {src => include/mgba/internal}/gba/gba.h (93%) rename {src => include/mgba/internal}/gba/hardware.h (96%) rename {src => include/mgba/internal}/gba/input.h (91%) rename {src => include/mgba/internal}/gba/io.h (98%) rename {src => include/mgba/internal}/gba/memory.h (95%) rename {src => include/mgba/internal}/gba/overrides.h (92%) rename {src => include/mgba/internal}/gba/renderers/thread-proxy.h (87%) rename {src => include/mgba/internal}/gba/renderers/tile-cache.h (94%) rename {src => include/mgba/internal}/gba/renderers/video-software.h (97%) rename {src => include/mgba/internal}/gba/rr/mgm.h (96%) rename {src => include/mgba/internal}/gba/rr/rr.h (94%) rename {src => include/mgba/internal}/gba/rr/vbm.h (89%) rename {src => include/mgba/internal}/gba/savedata.h (98%) rename {src => include/mgba/internal}/gba/serialize.h (98%) rename {src => include/mgba/internal}/gba/sharkport.h (94%) rename {src => include/mgba/internal}/gba/sio.h (95%) rename {src => include/mgba/internal}/gba/sio/lockstep.h (89%) rename {src => include/mgba/internal}/gba/timer.h (93%) rename {src => include/mgba/internal}/gba/vfame.h (97%) rename {src => include/mgba/internal}/gba/video.h (98%) rename {src => include/mgba/internal}/lr35902/debugger/cli-debugger.h (93%) rename {src => include/mgba/internal}/lr35902/debugger/debugger.h (92%) rename {src => include/mgba/internal}/lr35902/emitter-lr35902.h (100%) rename {src => include/mgba/internal}/lr35902/isa-lr35902.h (94%) rename {src => include/mgba/internal}/lr35902/lr35902.h (96%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d7ce8b389..4f6295731 100644 --- a/CMakeLists.txt +++ b/CMakeLists.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 @@ if(BUILD_EXAMPLE) 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() diff --git a/src/util/arm-algo.h b/include/mgba-util/arm-algo.h similarity index 100% rename from src/util/arm-algo.h rename to include/mgba-util/arm-algo.h diff --git a/src/util/circle-buffer.h b/include/mgba-util/circle-buffer.h similarity index 97% rename from src/util/circle-buffer.h rename to include/mgba-util/circle-buffer.h index e0cdc7bf2..28d436e03 100644 --- a/src/util/circle-buffer.h +++ b/include/mgba-util/circle-buffer.h @@ -6,7 +6,7 @@ #ifndef CIRCLE_BUFFER_H #define CIRCLE_BUFFER_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/common.h b/include/mgba-util/common.h similarity index 100% rename from src/util/common.h rename to include/mgba-util/common.h diff --git a/src/util/configuration.h b/include/mgba-util/configuration.h similarity index 96% rename from src/util/configuration.h rename to include/mgba-util/configuration.h index 54134dab9..e2e6ba7d3 100644 --- a/src/util/configuration.h +++ b/include/mgba-util/configuration.h @@ -6,11 +6,11 @@ #ifndef CONFIGURATION_H #define CONFIGURATION_H -#include "util/common.h" +#include CXX_GUARD_START -#include "util/table.h" +#include struct VFile; diff --git a/src/util/crc32.h b/include/mgba-util/crc32.h similarity index 94% rename from src/util/crc32.h rename to include/mgba-util/crc32.h index cb88f4337..225998bb9 100644 --- a/src/util/crc32.h +++ b/include/mgba-util/crc32.h @@ -6,7 +6,7 @@ #ifndef CRC32_H #define CRC32_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/export.h b/include/mgba-util/export.h similarity index 94% rename from src/util/export.h rename to include/mgba-util/export.h index bbdb37ea2..92047b93b 100644 --- a/src/util/export.h +++ b/include/mgba-util/export.h @@ -6,7 +6,7 @@ #ifndef EXPORT_H #define EXPORT_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/formatting.h b/include/mgba-util/formatting.h similarity index 96% rename from src/util/formatting.h rename to include/mgba-util/formatting.h index ff1745aa6..4395879aa 100644 --- a/src/util/formatting.h +++ b/include/mgba-util/formatting.h @@ -6,7 +6,7 @@ #ifndef FORMATTING_H #define FORMATTING_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/gui.h b/include/mgba-util/gui.h similarity index 93% rename from src/util/gui.h rename to include/mgba-util/gui.h index 526feab95..183fcfa80 100644 --- a/src/util/gui.h +++ b/include/mgba-util/gui.h @@ -6,12 +6,13 @@ #ifndef GUI_H #define GUI_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/input.h" -#include "util/vector.h" +// TODO: Fix layering violation +#include +#include struct GUIFont; diff --git a/src/util/gui/file-select.h b/include/mgba-util/gui/file-select.h similarity index 88% rename from src/util/gui/file-select.h rename to include/mgba-util/gui/file-select.h index c7df6668e..1d27673a2 100644 --- a/src/util/gui/file-select.h +++ b/include/mgba-util/gui/file-select.h @@ -6,11 +6,11 @@ #ifndef GUI_FILE_CHOOSER_H #define GUI_FILE_CHOOSER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "util/gui.h" +#include struct VFile; diff --git a/src/util/gui/font-metrics.h b/include/mgba-util/gui/font-metrics.h similarity index 92% rename from src/util/gui/font-metrics.h rename to include/mgba-util/gui/font-metrics.h index 8cb3ffeb4..c60d6dfc8 100644 --- a/src/util/gui/font-metrics.h +++ b/include/mgba-util/gui/font-metrics.h @@ -6,7 +6,7 @@ #ifndef DEFAULT_FONT_METRICS_H #define DEFAULT_FONT_METRICS_H -#include "util/gui/font.h" +#include extern struct GUIFontGlyphMetric defaultFontMetrics[]; extern struct GUIIconMetric defaultIconMetrics[]; diff --git a/src/util/gui/font.h b/include/mgba-util/gui/font.h similarity index 98% rename from src/util/gui/font.h rename to include/mgba-util/gui/font.h index 464440025..3ace00071 100644 --- a/src/util/gui/font.h +++ b/include/mgba-util/gui/font.h @@ -6,7 +6,7 @@ #ifndef GUI_FONT_H #define GUI_FONT_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/gui/menu.h b/include/mgba-util/gui/menu.h similarity index 95% rename from src/util/gui/menu.h rename to include/mgba-util/gui/menu.h index b99bfac2d..72a099a15 100644 --- a/src/util/gui/menu.h +++ b/include/mgba-util/gui/menu.h @@ -6,11 +6,11 @@ #ifndef GUI_MENU_H #define GUI_MENU_H -#include "util/common.h" +#include CXX_GUARD_START -#include "util/vector.h" +#include struct GUIMenu; struct GUIMenuItem { diff --git a/src/util/hash.h b/include/mgba-util/hash.h similarity index 92% rename from src/util/hash.h rename to include/mgba-util/hash.h index 31fd1f2b1..7376ba425 100644 --- a/src/util/hash.h +++ b/include/mgba-util/hash.h @@ -6,7 +6,7 @@ #ifndef HASH_H #define HASH_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/math.h b/include/mgba-util/math.h similarity index 98% rename from src/util/math.h rename to include/mgba-util/math.h index 6a69345f8..eaf2087a2 100644 --- a/src/util/math.h +++ b/include/mgba-util/math.h @@ -6,7 +6,7 @@ #ifndef UTIL_MATH_H #define UTIL_MATH_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/memory.h b/include/mgba-util/memory.h similarity index 93% rename from src/util/memory.h rename to include/mgba-util/memory.h index 444f5c6bb..325f748f6 100644 --- a/src/util/memory.h +++ b/include/mgba-util/memory.h @@ -6,7 +6,7 @@ #ifndef MEMORY_H #define MEMORY_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/nointro.h b/include/mgba-util/nointro.h similarity index 96% rename from src/util/nointro.h rename to include/mgba-util/nointro.h index 46eb4088f..6c8a3e6b5 100644 --- a/src/util/nointro.h +++ b/include/mgba-util/nointro.h @@ -6,7 +6,7 @@ #ifndef NOINTRO_H #define NOINTRO_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/patch.h b/include/mgba-util/patch.h similarity index 95% rename from src/util/patch.h rename to include/mgba-util/patch.h index e0af658ee..7bf81dc93 100644 --- a/src/util/patch.h +++ b/include/mgba-util/patch.h @@ -6,7 +6,7 @@ #ifndef PATCH_H #define PATCH_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/patch-fast.h b/include/mgba-util/patch/fast.h similarity index 89% rename from src/util/patch-fast.h rename to include/mgba-util/patch/fast.h index 95a2503a4..6657a0419 100644 --- a/src/util/patch-fast.h +++ b/include/mgba-util/patch/fast.h @@ -6,12 +6,12 @@ #ifndef PATCH_FAST_H #define PATCH_FAST_H -#include "util/common.h" +#include CXX_GUARD_START -#include "util/patch.h" -#include "util/vector.h" +#include +#include #define PATCH_FAST_EXTENT 256 diff --git a/src/util/patch-ips.h b/include/mgba-util/patch/ips.h similarity index 92% rename from src/util/patch-ips.h rename to include/mgba-util/patch/ips.h index d730e68ba..2047d21e7 100644 --- a/src/util/patch-ips.h +++ b/include/mgba-util/patch/ips.h @@ -6,7 +6,7 @@ #ifndef PATCH_IPS_H #define PATCH_IPS_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/patch-ups.h b/include/mgba-util/patch/ups.h similarity index 92% rename from src/util/patch-ups.h rename to include/mgba-util/patch/ups.h index bc29c1afa..2e53cda45 100644 --- a/src/util/patch-ups.h +++ b/include/mgba-util/patch/ups.h @@ -6,7 +6,7 @@ #ifndef PATCH_UPS_H #define PATCH_UPS_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/platform/3ds/3ds-vfs.h b/include/mgba-util/platform/3ds/3ds-vfs.h similarity index 94% rename from src/platform/3ds/3ds-vfs.h rename to include/mgba-util/platform/3ds/3ds-vfs.h index 35c6dfbe7..71344b76e 100644 --- a/src/platform/3ds/3ds-vfs.h +++ b/include/mgba-util/platform/3ds/3ds-vfs.h @@ -6,7 +6,7 @@ #ifndef N3DS_VFS_H #define N3DS_VFS_H -#include "util/vfs.h" +#include #include <3ds.h> diff --git a/src/platform/3ds/threading.h b/include/mgba-util/platform/3ds/threading.h similarity index 98% rename from src/platform/3ds/threading.h rename to include/mgba-util/platform/3ds/threading.h index 69d48c6cb..0eda3dd43 100644 --- a/src/platform/3ds/threading.h +++ b/include/mgba-util/platform/3ds/threading.h @@ -6,7 +6,7 @@ #ifndef N3DS_THREADING_H #define N3DS_THREADING_H -#include "util/common.h" +#include #include <3ds.h> #include diff --git a/src/platform/posix/threading.h b/include/mgba-util/platform/posix/threading.h similarity index 98% rename from src/platform/posix/threading.h rename to include/mgba-util/platform/posix/threading.h index 0b958af54..b880c548d 100644 --- a/src/platform/posix/threading.h +++ b/include/mgba-util/platform/posix/threading.h @@ -6,7 +6,7 @@ #ifndef POSIX_THREADING_H #define POSIX_THREADING_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/platform/psp2/sce-vfs.h b/include/mgba-util/platform/psp2/sce-vfs.h similarity index 100% rename from src/platform/psp2/sce-vfs.h rename to include/mgba-util/platform/psp2/sce-vfs.h diff --git a/src/platform/psp2/threading.h b/include/mgba-util/platform/psp2/threading.h similarity index 100% rename from src/platform/psp2/threading.h rename to include/mgba-util/platform/psp2/threading.h diff --git a/src/platform/windows/getopt.h b/include/mgba-util/platform/windows/getopt.h similarity index 100% rename from src/platform/windows/getopt.h rename to include/mgba-util/platform/windows/getopt.h diff --git a/src/platform/windows/threading.h b/include/mgba-util/platform/windows/threading.h similarity index 98% rename from src/platform/windows/threading.h rename to include/mgba-util/platform/windows/threading.h index efcf3a091..33af88b58 100644 --- a/src/platform/windows/threading.h +++ b/include/mgba-util/platform/windows/threading.h @@ -6,7 +6,7 @@ #ifndef WINDOWS_THREADING_H #define WINDOWS_THREADING_H -#include "util/common.h" +#include #define _WIN32_WINNT 0x0600 #include diff --git a/src/util/png-io.h b/include/mgba-util/png-io.h similarity index 97% rename from src/util/png-io.h rename to include/mgba-util/png-io.h index 25680e9c9..1f8fea331 100644 --- a/src/util/png-io.h +++ b/include/mgba-util/png-io.h @@ -6,7 +6,7 @@ #ifndef PNG_IO_H #define PNG_IO_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/ring-fifo.h b/include/mgba-util/ring-fifo.h similarity index 96% rename from src/util/ring-fifo.h rename to include/mgba-util/ring-fifo.h index a98d5f1f7..c5b1fdcc5 100644 --- a/src/util/ring-fifo.h +++ b/include/mgba-util/ring-fifo.h @@ -6,7 +6,7 @@ #ifndef RING_FIFO_H #define RING_FIFO_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/socket.h b/include/mgba-util/socket.h similarity index 99% rename from src/util/socket.h rename to include/mgba-util/socket.h index 12e509f83..327c2c69c 100644 --- a/src/util/socket.h +++ b/include/mgba-util/socket.h @@ -6,7 +6,7 @@ #ifndef SOCKET_H #define SOCKET_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/string.h b/include/mgba-util/string.h similarity index 97% rename from src/util/string.h rename to include/mgba-util/string.h index 04b0fce63..831ce8e44 100644 --- a/src/util/string.h +++ b/include/mgba-util/string.h @@ -6,7 +6,7 @@ #ifndef UTIL_STRING_H #define UTIL_STRING_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/table.h b/include/mgba-util/table.h similarity index 97% rename from src/util/table.h rename to include/mgba-util/table.h index 6e3979476..a03fb3734 100644 --- a/src/util/table.h +++ b/include/mgba-util/table.h @@ -6,7 +6,7 @@ #ifndef TABLE_H #define TABLE_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/text-codec.h b/include/mgba-util/text-codec.h similarity index 97% rename from src/util/text-codec.h rename to include/mgba-util/text-codec.h index 4ea3f8596..284705a19 100644 --- a/src/util/text-codec.h +++ b/include/mgba-util/text-codec.h @@ -6,7 +6,7 @@ #ifndef TEXT_CODEC_H #define TEXT_CODEC_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/threading.h b/include/mgba-util/threading.h similarity index 87% rename from src/util/threading.h rename to include/mgba-util/threading.h index 21ed062b2..d59ebcc5a 100644 --- a/src/util/threading.h +++ b/include/mgba-util/threading.h @@ -6,19 +6,19 @@ #ifndef THREADING_H #define THREADING_H -#include "util/common.h" +#include CXX_GUARD_START #ifndef DISABLE_THREADING #ifdef USE_PTHREADS -#include "platform/posix/threading.h" +#include #elif _WIN32 -#include "platform/windows/threading.h" +#include #elif PSP2 -#include "platform/psp2/threading.h" +#include #elif _3DS -#include "platform/3ds/threading.h" +#include #else #define DISABLE_THREADING #endif diff --git a/src/util/vector.h b/include/mgba-util/vector.h similarity index 99% rename from src/util/vector.h rename to include/mgba-util/vector.h index 8e35caa79..0839d61b2 100644 --- a/src/util/vector.h +++ b/include/mgba-util/vector.h @@ -6,7 +6,7 @@ #ifndef VECTOR_H #define VECTOR_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/util/vfs.h b/include/mgba-util/vfs.h similarity index 97% rename from src/util/vfs.h rename to include/mgba-util/vfs.h index f05b7fc8a..abe723d98 100644 --- a/src/util/vfs.h +++ b/include/mgba-util/vfs.h @@ -6,7 +6,7 @@ #ifndef VFS_H #define VFS_H -#include "util/common.h" +#include CXX_GUARD_START @@ -84,7 +84,7 @@ struct VDir* VDirOpenZip(const char* path, int flags); 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); diff --git a/src/third-party/blip_buf/blip_buf.h b/include/mgba/core/blip_buf.h similarity index 100% rename from src/third-party/blip_buf/blip_buf.h rename to include/mgba/core/blip_buf.h diff --git a/src/core/cheats.h b/include/mgba/core/cheats.h similarity index 95% rename from src/core/cheats.h rename to include/mgba/core/cheats.h index 774dbede5..7960ae58b 100644 --- a/src/core/cheats.h +++ b/include/mgba/core/cheats.h @@ -6,13 +6,13 @@ #ifndef CHEATS_H #define CHEATS_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/cpu.h" -#include "core/log.h" -#include "util/vector.h" +#include +#include +#include #define MAX_ROM_PATCHES 4 diff --git a/src/core/config.h b/include/mgba/core/config.h similarity index 98% rename from src/core/config.h rename to include/mgba/core/config.h index d76646c35..6fe37ce6d 100644 --- a/src/core/config.h +++ b/include/mgba/core/config.h @@ -6,11 +6,11 @@ #ifndef M_CORE_CONFIG_H #define M_CORE_CONFIG_H -#include "util/common.h" +#include CXX_GUARD_START -#include "util/configuration.h" +#include struct mCoreConfig { struct Configuration configTable; diff --git a/src/core/core.h b/include/mgba/core/core.h similarity index 95% rename from src/core/core.h rename to include/mgba/core/core.h index f5592adc8..473e6f876 100644 --- a/src/core/core.h +++ b/include/mgba/core/core.h @@ -6,20 +6,21 @@ #ifndef M_CORE_H #define M_CORE_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/config.h" +#include #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 -#include "core/directories.h" +#include #endif #ifndef MINIMAL_CORE -#include "core/input.h" +#include #endif -#include "core/interface.h" +#include #ifdef USE_DEBUGGERS -#include "debugger/debugger.h" +// TODO: Fix layering violation +#include #endif enum mPlatform { diff --git a/src/core/cpu.h b/include/mgba/core/cpu.h similarity index 95% rename from src/core/cpu.h rename to include/mgba/core/cpu.h index 079e9eb5c..fe6caedd3 100644 --- a/src/core/cpu.h +++ b/include/mgba/core/cpu.h @@ -6,7 +6,7 @@ #ifndef M_CPU_H #define M_CPU_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/core/directories.h b/include/mgba/core/directories.h similarity index 97% rename from src/core/directories.h rename to include/mgba/core/directories.h index b56787a9a..8715c1025 100644 --- a/src/core/directories.h +++ b/include/mgba/core/directories.h @@ -6,7 +6,7 @@ #ifndef DIRECTORIES_H #define DIRECTORIES_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/core/input.h b/include/mgba/core/input.h similarity index 98% rename from src/core/input.h rename to include/mgba/core/input.h index 01d55f26b..0d9955981 100644 --- a/src/core/input.h +++ b/include/mgba/core/input.h @@ -6,7 +6,7 @@ #ifndef M_INPUT_H #define M_INPUT_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/core/interface.h b/include/mgba/core/interface.h similarity index 98% rename from src/core/interface.h rename to include/mgba/core/interface.h index 805f555f1..2e78390cf 100644 --- a/src/core/interface.h +++ b/include/mgba/core/interface.h @@ -6,7 +6,7 @@ #ifndef CORE_INTERFACE_H #define CORE_INTERFACE_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/core/library.h b/include/mgba/core/library.h similarity index 90% rename from src/core/library.h rename to include/mgba/core/library.h index 8a4fa68ff..be5dec001 100644 --- a/src/core/library.h +++ b/include/mgba/core/library.h @@ -6,12 +6,12 @@ #ifndef M_LIBRARY_H #define M_LIBRARY_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/core.h" -#include "util/vector.h" +#include +#include struct mLibraryEntry { char* filename; diff --git a/src/core/lockstep.h b/include/mgba/core/lockstep.h similarity index 96% rename from src/core/lockstep.h rename to include/mgba/core/lockstep.h index be9e939b7..06c1bc6b6 100644 --- a/src/core/lockstep.h +++ b/include/mgba/core/lockstep.h @@ -6,7 +6,7 @@ #ifndef SIO_LOCKSTEP_H #define SIO_LOCKSTEP_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/core/log.h b/include/mgba/core/log.h similarity index 97% rename from src/core/log.h rename to include/mgba/core/log.h index 9986fcbd7..6c8615c93 100644 --- a/src/core/log.h +++ b/include/mgba/core/log.h @@ -6,7 +6,7 @@ #ifndef M_LOG_H #define M_LOG_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/core/rewind.h b/include/mgba/core/rewind.h similarity index 93% rename from src/core/rewind.h rename to include/mgba/core/rewind.h index 3d951ae1a..a1a748d3d 100644 --- a/src/core/rewind.h +++ b/include/mgba/core/rewind.h @@ -6,11 +6,11 @@ #ifndef M_CORE_REWIND_H #define M_CORE_REWIND_H -#include "util/common.h" +#include CXX_GUARD_START -#include "util/vector.h" +#include DECLARE_VECTOR(mCoreRewindPatches, struct PatchFast); diff --git a/src/core/serialize.h b/include/mgba/core/serialize.h similarity index 97% rename from src/core/serialize.h rename to include/mgba/core/serialize.h index b901fbe40..266cab0ca 100644 --- a/src/core/serialize.h +++ b/include/mgba/core/serialize.h @@ -6,7 +6,7 @@ #ifndef M_SERIALIZE_H #define M_SERIALIZE_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/core/sync.h b/include/mgba/core/sync.h similarity index 94% rename from src/core/sync.h rename to include/mgba/core/sync.h index 19add7e76..1ca30335a 100644 --- a/src/core/sync.h +++ b/include/mgba/core/sync.h @@ -6,11 +6,11 @@ #ifndef M_CORE_SYNC_H #define M_CORE_SYNC_H -#include "util/common.h" +#include CXX_GUARD_START -#include "util/threading.h" +#include struct mCoreSync { int videoFramePending; diff --git a/src/core/thread.h b/include/mgba/core/thread.h similarity index 95% rename from src/core/thread.h rename to include/mgba/core/thread.h index 07ec8b9a0..b0a60ac80 100644 --- a/src/core/thread.h +++ b/include/mgba/core/thread.h @@ -6,14 +6,14 @@ #ifndef M_CORE_THREAD_H #define M_CORE_THREAD_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" -#include "core/rewind.h" -#include "core/sync.h" -#include "util/threading.h" +#include +#include +#include +#include struct mCoreThread; struct mCore; diff --git a/src/core/tile-cache.h b/include/mgba/core/tile-cache.h similarity index 98% rename from src/core/tile-cache.h rename to include/mgba/core/tile-cache.h index b1f780f55..0a71c690a 100644 --- a/src/core/tile-cache.h +++ b/include/mgba/core/tile-cache.h @@ -6,7 +6,7 @@ #ifndef M_TILE_CACHE_H #define M_TILE_CACHE_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/core/timing.h b/include/mgba/core/timing.h similarity index 97% rename from src/core/timing.h rename to include/mgba/core/timing.h index 815215dd8..19de59dc7 100644 --- a/src/core/timing.h +++ b/include/mgba/core/timing.h @@ -6,7 +6,7 @@ #ifndef M_CORE_TIMING #define M_CORE_TIMING -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/core/version.h b/include/mgba/core/version.h similarity index 100% rename from src/core/version.h rename to include/mgba/core/version.h diff --git a/src/gb/core.h b/include/mgba/gb/core.h similarity index 92% rename from src/gb/core.h rename to include/mgba/gb/core.h index 5839b6709..10b284803 100644 --- a/src/gb/core.h +++ b/include/mgba/gb/core.h @@ -6,7 +6,7 @@ #ifndef GB_CORE_H #define GB_CORE_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/gb/interface.h b/include/mgba/gb/interface.h similarity index 96% rename from src/gb/interface.h rename to include/mgba/gb/interface.h index 2764c2a9b..098a5e5dd 100644 --- a/src/gb/interface.h +++ b/include/mgba/gb/interface.h @@ -6,7 +6,7 @@ #ifndef GB_INTERFACE_H #define GB_INTERFACE_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/gba/core.h b/include/mgba/gba/core.h similarity index 92% rename from src/gba/core.h rename to include/mgba/gba/core.h index add75ede7..cb4c1a862 100644 --- a/src/gba/core.h +++ b/include/mgba/gba/core.h @@ -6,7 +6,7 @@ #ifndef GBA_CORE_H #define GBA_CORE_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/gba/interface.h b/include/mgba/gba/interface.h similarity index 94% rename from src/gba/interface.h rename to include/mgba/gba/interface.h index 2c9df6be3..3a5412645 100644 --- a/src/gba/interface.h +++ b/include/mgba/gba/interface.h @@ -6,11 +6,11 @@ #ifndef GBA_INTERFACE_H #define GBA_INTERFACE_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/interface.h" +#include enum GBASIOMode { SIO_NORMAL_8 = 0, diff --git a/src/arm/arm.h b/include/mgba/internal/arm/arm.h similarity index 98% rename from src/arm/arm.h rename to include/mgba/internal/arm/arm.h index c3c0eccfc..7bc1328bf 100644 --- a/src/arm/arm.h +++ b/include/mgba/internal/arm/arm.h @@ -6,11 +6,11 @@ #ifndef ARM_H #define ARM_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/cpu.h" +#include enum { ARM_SP = 13, diff --git a/src/arm/debugger/cli-debugger.h b/include/mgba/internal/arm/debugger/cli-debugger.h similarity index 93% rename from src/arm/debugger/cli-debugger.h rename to include/mgba/internal/arm/debugger/cli-debugger.h index c4e6bff6e..70f9b1885 100644 --- a/src/arm/debugger/cli-debugger.h +++ b/include/mgba/internal/arm/debugger/cli-debugger.h @@ -6,7 +6,7 @@ #ifndef ARM_CLI_DEBUGGER_H #define ARM_CLI_DEBUGGER_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/arm/debugger/debugger.h b/include/mgba/internal/arm/debugger/debugger.h similarity index 93% rename from src/arm/debugger/debugger.h rename to include/mgba/internal/arm/debugger/debugger.h index a12e30a58..d5a05e6fd 100644 --- a/src/arm/debugger/debugger.h +++ b/include/mgba/internal/arm/debugger/debugger.h @@ -6,13 +6,13 @@ #ifndef ARM_DEBUGGER_H #define ARM_DEBUGGER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "debugger/debugger.h" +#include -#include "arm/arm.h" +#include struct ARMDebugBreakpoint { uint32_t address; diff --git a/src/arm/debugger/memory-debugger.h b/include/mgba/internal/arm/debugger/memory-debugger.h similarity index 94% rename from src/arm/debugger/memory-debugger.h rename to include/mgba/internal/arm/debugger/memory-debugger.h index b27dec8d8..1ec675992 100644 --- a/src/arm/debugger/memory-debugger.h +++ b/include/mgba/internal/arm/debugger/memory-debugger.h @@ -6,7 +6,7 @@ #ifndef MEMORY_DEBUGGER_H #define MEMORY_DEBUGGER_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/arm/decoder-inlines.h b/include/mgba/internal/arm/decoder-inlines.h similarity index 100% rename from src/arm/decoder-inlines.h rename to include/mgba/internal/arm/decoder-inlines.h diff --git a/src/arm/decoder.h b/include/mgba/internal/arm/decoder.h similarity index 98% rename from src/arm/decoder.h rename to include/mgba/internal/arm/decoder.h index eabd30272..4f6322b28 100644 --- a/src/arm/decoder.h +++ b/include/mgba/internal/arm/decoder.h @@ -6,11 +6,11 @@ #ifndef ARM_DECODER_H #define ARM_DECODER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "arm.h" +#include // Bit 0: a register is involved with this operand // Bit 1: an immediate is invovled with this operand diff --git a/src/arm/emitter-arm.h b/include/mgba/internal/arm/emitter-arm.h similarity index 100% rename from src/arm/emitter-arm.h rename to include/mgba/internal/arm/emitter-arm.h diff --git a/src/arm/emitter-inlines.h b/include/mgba/internal/arm/emitter-inlines.h similarity index 100% rename from src/arm/emitter-inlines.h rename to include/mgba/internal/arm/emitter-inlines.h diff --git a/src/arm/emitter-thumb.h b/include/mgba/internal/arm/emitter-thumb.h similarity index 100% rename from src/arm/emitter-thumb.h rename to include/mgba/internal/arm/emitter-thumb.h diff --git a/src/arm/isa-arm.h b/include/mgba/internal/arm/isa-arm.h similarity index 94% rename from src/arm/isa-arm.h rename to include/mgba/internal/arm/isa-arm.h index 7f3063171..fb347cd89 100644 --- a/src/arm/isa-arm.h +++ b/include/mgba/internal/arm/isa-arm.h @@ -6,7 +6,7 @@ #ifndef ISA_ARM_H #define ISA_ARM_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/arm/isa-inlines.h b/include/mgba/internal/arm/isa-inlines.h similarity index 100% rename from src/arm/isa-inlines.h rename to include/mgba/internal/arm/isa-inlines.h diff --git a/src/arm/isa-thumb.h b/include/mgba/internal/arm/isa-thumb.h similarity index 93% rename from src/arm/isa-thumb.h rename to include/mgba/internal/arm/isa-thumb.h index 71ddd06ed..330a4faf8 100644 --- a/src/arm/isa-thumb.h +++ b/include/mgba/internal/arm/isa-thumb.h @@ -6,7 +6,7 @@ #ifndef ISA_THUMB_H #define ISA_THUMB_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/arm/macros.h b/include/mgba/internal/arm/macros.h similarity index 93% rename from src/arm/macros.h rename to include/mgba/internal/arm/macros.h index abde45bf1..4832f0546 100644 --- a/src/arm/macros.h +++ b/include/mgba/internal/arm/macros.h @@ -6,7 +6,7 @@ #ifndef MACROS_H #define MACROS_H -#include "util/common.h" +#include #define LOAD_64 LOAD_64LE #define LOAD_32 LOAD_32LE diff --git a/src/debugger/cli-debugger.h b/include/mgba/internal/debugger/cli-debugger.h similarity index 97% rename from src/debugger/cli-debugger.h rename to include/mgba/internal/debugger/cli-debugger.h index c82a8b493..2f86590ee 100644 --- a/src/debugger/cli-debugger.h +++ b/include/mgba/internal/debugger/cli-debugger.h @@ -6,11 +6,11 @@ #ifndef CLI_DEBUGGER_H #define CLI_DEBUGGER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "debugger.h" +#include struct CLIDebugger; diff --git a/src/debugger/debugger.h b/include/mgba/internal/debugger/debugger.h similarity index 95% rename from src/debugger/debugger.h rename to include/mgba/internal/debugger/debugger.h index 858d76554..3cd228dc7 100644 --- a/src/debugger/debugger.h +++ b/include/mgba/internal/debugger/debugger.h @@ -6,13 +6,13 @@ #ifndef DEBUGGER_H #define DEBUGGER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/cpu.h" -#include "core/log.h" -#include "util/vector.h" +#include +#include +#include mLOG_DECLARE_CATEGORY(DEBUGGER); diff --git a/src/debugger/gdb-stub.h b/include/mgba/internal/debugger/gdb-stub.h similarity index 90% rename from src/debugger/gdb-stub.h rename to include/mgba/internal/debugger/gdb-stub.h index 84b086a60..9e6be2239 100644 --- a/src/debugger/gdb-stub.h +++ b/include/mgba/internal/debugger/gdb-stub.h @@ -6,13 +6,13 @@ #ifndef GDB_STUB_H #define GDB_STUB_H -#include "util/common.h" +#include CXX_GUARD_START -#include "debugger/debugger.h" +#include -#include "util/socket.h" +#include #define GDB_STUB_MAX_LINE 1200 #define GDB_STUB_INTERVAL 32 diff --git a/src/debugger/parser.h b/include/mgba/internal/debugger/parser.h similarity index 94% rename from src/debugger/parser.h rename to include/mgba/internal/debugger/parser.h index 39ac6d262..c5ab01446 100644 --- a/src/debugger/parser.h +++ b/include/mgba/internal/debugger/parser.h @@ -6,11 +6,11 @@ #ifndef PARSER_H #define PARSER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "debugger.h" +#include enum LexState { LEX_ERROR = -1, diff --git a/src/gb/audio.h b/include/mgba/internal/gb/audio.h similarity index 98% rename from src/gb/audio.h rename to include/mgba/internal/gb/audio.h index bd47a72e9..b1e86e299 100644 --- a/src/gb/audio.h +++ b/include/mgba/internal/gb/audio.h @@ -6,12 +6,11 @@ #ifndef GB_AUDIO_H #define GB_AUDIO_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/timing.h" -#include "third-party/blip_buf/blip_buf.h" +#include DECL_BITFIELD(GBAudioRegisterDuty, uint8_t); DECL_BITS(GBAudioRegisterDuty, Length, 0, 6); @@ -157,8 +156,8 @@ struct GBAudio { 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; diff --git a/src/gb/cheats.h b/include/mgba/internal/gb/cheats.h similarity index 89% rename from src/gb/cheats.h rename to include/mgba/internal/gb/cheats.h index 5b2f7e3a0..0eb7d3b3c 100644 --- a/src/gb/cheats.h +++ b/include/mgba/internal/gb/cheats.h @@ -6,12 +6,12 @@ #ifndef GB_CHEATS_H #define GB_CHEATS_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/cheats.h" -#include "util/vector.h" +#include +#include enum GBCheatType { GB_CHEAT_AUTODETECT, diff --git a/src/gb/extra/cli.h b/include/mgba/internal/gb/extra/cli.h similarity index 86% rename from src/gb/extra/cli.h rename to include/mgba/internal/gb/extra/cli.h index 343ef1546..19c2c711b 100644 --- a/src/gb/extra/cli.h +++ b/include/mgba/internal/gb/extra/cli.h @@ -6,11 +6,11 @@ #ifndef GB_CLI_H #define GB_CLI_H -#include "util/common.h" +#include CXX_GUARD_START -#include "debugger/cli-debugger.h" +#include struct GBCLIDebugger { struct CLIDebuggerSystem d; diff --git a/src/gb/gb.h b/include/mgba/internal/gb/gb.h similarity index 90% rename from src/gb/gb.h rename to include/mgba/internal/gb/gb.h index 0ed6f99a0..d047f1c2c 100644 --- a/src/gb/gb.h +++ b/include/mgba/internal/gb/gb.h @@ -6,21 +6,19 @@ #ifndef GB_H #define GB_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" -#include "core/timing.h" +#include +#include +#include -#include "lr35902/lr35902.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 +#include +#include +#include +#include extern const uint32_t DMG_LR35902_FREQUENCY; extern const uint32_t CGB_LR35902_FREQUENCY; @@ -45,6 +43,7 @@ enum GBIRQVector { GB_VECTOR_KEYPAD = 0x60, }; +struct LR35902Core; struct mCoreSync; struct mAVStream; struct mCoreCallbacks; diff --git a/src/gb/io.h b/include/mgba/internal/gb/io.h similarity index 97% rename from src/gb/io.h rename to include/mgba/internal/gb/io.h index 756157565..5ed4cb0fe 100644 --- a/src/gb/io.h +++ b/include/mgba/internal/gb/io.h @@ -6,11 +6,11 @@ #ifndef GB_IO_H #define GB_IO_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" +#include mLOG_DECLARE_CATEGORY(GB_IO); diff --git a/src/gb/mbc.h b/include/mgba/internal/gb/mbc.h similarity index 94% rename from src/gb/mbc.h rename to include/mgba/internal/gb/mbc.h index b38b53096..32496177f 100644 --- a/src/gb/mbc.h +++ b/include/mgba/internal/gb/mbc.h @@ -6,11 +6,11 @@ #ifndef GB_MBC_H #define GB_MBC_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" +#include mLOG_DECLARE_CATEGORY(GB_MBC); diff --git a/src/gb/memory.h b/include/mgba/internal/gb/memory.h similarity index 96% rename from src/gb/memory.h rename to include/mgba/internal/gb/memory.h index 1117bb4b5..45a3f0aed 100644 --- a/src/gb/memory.h +++ b/include/mgba/internal/gb/memory.h @@ -6,14 +6,13 @@ #ifndef GB_MEMORY_H #define GB_MEMORY_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" -#include "core/timing.h" -#include "gb/interface.h" -#include "lr35902/lr35902.h" +#include +#include +#include #include @@ -154,6 +153,7 @@ struct GBMemory { struct mRumble* rumble; }; +struct LR35902Core; void GBMemoryInit(struct GB* gb); void GBMemoryDeinit(struct GB* gb); diff --git a/src/gb/overrides.h b/include/mgba/internal/gb/overrides.h similarity index 92% rename from src/gb/overrides.h rename to include/mgba/internal/gb/overrides.h index 1779aea16..fd787163c 100644 --- a/src/gb/overrides.h +++ b/include/mgba/internal/gb/overrides.h @@ -6,11 +6,11 @@ #ifndef GB_OVERRIDES_H #define GB_OVERRIDES_H -#include "util/common.h" +#include CXX_GUARD_START -#include "gb/interface.h" +#include struct GBCartridgeOverride { int headerCrc32; diff --git a/src/gb/renderers/software.h b/include/mgba/internal/gb/renderers/software.h similarity index 85% rename from src/gb/renderers/software.h rename to include/mgba/internal/gb/renderers/software.h index 9f2b9e519..038c660b8 100644 --- a/src/gb/renderers/software.h +++ b/include/mgba/internal/gb/renderers/software.h @@ -6,13 +6,13 @@ #ifndef GB_RENDERER_SOFTWARE_H #define GB_RENDERER_SOFTWARE_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/core.h" -#include "gb/gb.h" -#include "gb/video.h" +#include +#include +#include struct GBVideoSoftwareRenderer { struct GBVideoRenderer d; diff --git a/src/gb/renderers/tile-cache.h b/include/mgba/internal/gb/renderers/tile-cache.h similarity index 94% rename from src/gb/renderers/tile-cache.h rename to include/mgba/internal/gb/renderers/tile-cache.h index 7a96ec866..1b739ca46 100644 --- a/src/gb/renderers/tile-cache.h +++ b/include/mgba/internal/gb/renderers/tile-cache.h @@ -6,7 +6,7 @@ #ifndef GB_TILE_CACHE_H #define GB_TILE_CACHE_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/gb/serialize.h b/include/mgba/internal/gb/serialize.h similarity index 99% rename from src/gb/serialize.h rename to include/mgba/internal/gb/serialize.h index 9819af85a..e370c997b 100644 --- a/src/gb/serialize.h +++ b/include/mgba/internal/gb/serialize.h @@ -6,12 +6,12 @@ #ifndef GB_SERIALIZE_H #define GB_SERIALIZE_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/core.h" -#include "gb/gb.h" +#include +#include extern const uint32_t GB_SAVESTATE_MAGIC; extern const uint32_t GB_SAVESTATE_VERSION; diff --git a/src/gb/sio.h b/include/mgba/internal/gb/sio.h similarity index 93% rename from src/gb/sio.h rename to include/mgba/internal/gb/sio.h index e101f9c3f..004cf16e8 100644 --- a/src/gb/sio.h +++ b/include/mgba/internal/gb/sio.h @@ -6,12 +6,12 @@ #ifndef GB_SIO_H #define GB_SIO_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" -#include "core/timing.h" +#include +#include #define MAX_GBS 2 diff --git a/src/gb/sio/lockstep.h b/include/mgba/internal/gb/sio/lockstep.h similarity index 88% rename from src/gb/sio/lockstep.h rename to include/mgba/internal/gb/sio/lockstep.h index 2b1b52815..25f6d9c74 100644 --- a/src/gb/sio/lockstep.h +++ b/include/mgba/internal/gb/sio/lockstep.h @@ -6,13 +6,13 @@ #ifndef GB_SIO_LOCKSTEP_H #define GB_SIO_LOCKSTEP_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/lockstep.h" -#include "core/timing.h" -#include "gb/sio.h" +#include +#include +#include struct GBSIOLockstep { struct mLockstep d; diff --git a/src/gb/timer.h b/include/mgba/internal/gb/timer.h similarity index 94% rename from src/gb/timer.h rename to include/mgba/internal/gb/timer.h index 0a6ebcea9..b81ff1c34 100644 --- a/src/gb/timer.h +++ b/include/mgba/internal/gb/timer.h @@ -6,11 +6,11 @@ #ifndef GB_TIMER_H #define GB_TIMER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/timing.h" +#include DECL_BITFIELD(GBRegisterTAC, uint8_t); DECL_BITS(GBRegisterTAC, Clock, 0, 2); diff --git a/src/gb/video.h b/include/mgba/internal/gb/video.h similarity index 96% rename from src/gb/video.h rename to include/mgba/internal/gb/video.h index e9ff5b956..67bf96405 100644 --- a/src/gb/video.h +++ b/include/mgba/internal/gb/video.h @@ -6,14 +6,12 @@ #ifndef GB_VIDEO_H #define GB_VIDEO_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/interface.h" -#include "core/timing.h" -#include "gb/interface.h" -#include "gb/memory.h" +#include +#include enum { GB_VIDEO_HORIZONTAL_PIXELS = 160, @@ -55,7 +53,6 @@ union GBOAM { uint8_t raw[160]; }; -enum GBModel; struct mTileCache; struct GBVideoRenderer { void (*init)(struct GBVideoRenderer* renderer, enum GBModel model); diff --git a/src/gba/audio.h b/include/mgba/internal/gba/audio.h similarity index 96% rename from src/gba/audio.h rename to include/mgba/internal/gba/audio.h index 3a6d07348..10f5a7e65 100644 --- a/src/gba/audio.h +++ b/include/mgba/internal/gba/audio.h @@ -6,13 +6,13 @@ #ifndef GBA_AUDIO_H #define GBA_AUDIO_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" -#include "gb/audio.h" -#include "util/circle-buffer.h" +#include +#include +#include mLOG_DECLARE_CATEGORY(GBA_AUDIO); diff --git a/src/gba/bios.h b/include/mgba/internal/gba/bios.h similarity index 89% rename from src/gba/bios.h rename to include/mgba/internal/gba/bios.h index 7d2bed194..a89edfd68 100644 --- a/src/gba/bios.h +++ b/include/mgba/internal/gba/bios.h @@ -6,15 +6,15 @@ #ifndef GBA_BIOS_H #define GBA_BIOS_H -#include "util/common.h" +#include CXX_GUARD_START -#include "arm/arm.h" -#include "core/log.h" +#include mLOG_DECLARE_CATEGORY(GBA_BIOS); +struct ARMCore; void GBASwi16(struct ARMCore* cpu, int immediate); void GBASwi32(struct ARMCore* cpu, int immediate); diff --git a/src/gba/cheats.h b/include/mgba/internal/gba/cheats.h similarity index 97% rename from src/gba/cheats.h rename to include/mgba/internal/gba/cheats.h index 6dcd01f53..83912f660 100644 --- a/src/gba/cheats.h +++ b/include/mgba/internal/gba/cheats.h @@ -6,12 +6,12 @@ #ifndef GBA_CHEATS_H #define GBA_CHEATS_H -#include "util/common.h" +#include CXX_GUARD_START -#include "arm/arm.h" -#include "core/cheats.h" +#include +#include #define MAX_ROM_PATCHES 4 #define COMPLETE ((size_t) -1) diff --git a/src/gba/dma.h b/include/mgba/internal/gba/dma.h similarity index 96% rename from src/gba/dma.h rename to include/mgba/internal/gba/dma.h index 984980c87..fd86829af 100644 --- a/src/gba/dma.h +++ b/include/mgba/internal/gba/dma.h @@ -6,7 +6,7 @@ #ifndef GBA_DMA_H #define GBA_DMA_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/gba/extra/cli.h b/include/mgba/internal/gba/extra/cli.h similarity index 86% rename from src/gba/extra/cli.h rename to include/mgba/internal/gba/extra/cli.h index e77f8439d..2b2d407fe 100644 --- a/src/gba/extra/cli.h +++ b/include/mgba/internal/gba/extra/cli.h @@ -6,11 +6,11 @@ #ifndef GBA_CLI_H #define GBA_CLI_H -#include "util/common.h" +#include CXX_GUARD_START -#include "debugger/cli-debugger.h" +#include struct mCore; diff --git a/src/gba/gba.h b/include/mgba/internal/gba/gba.h similarity index 93% rename from src/gba/gba.h rename to include/mgba/internal/gba/gba.h index bcbdc544e..73171095b 100644 --- a/src/gba/gba.h +++ b/include/mgba/internal/gba/gba.h @@ -6,20 +6,18 @@ #ifndef GBA_H #define GBA_H -#include "util/common.h" +#include CXX_GUARD_START -#include "arm/arm.h" -#include "core/log.h" -#include "core/timing.h" +#include +#include -#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 +#include +#include +#include +#include #define GBA_ARM7TDMI_FREQUENCY 0x1000000U @@ -52,6 +50,7 @@ enum { SP_BASE_SUPERVISOR = 0x03007FE0 }; +struct ARMCore; struct GBA; struct Patch; struct VFile; diff --git a/src/gba/hardware.h b/include/mgba/internal/gba/hardware.h similarity index 96% rename from src/gba/hardware.h rename to include/mgba/internal/gba/hardware.h index 0329fbf5e..8aa98ba47 100644 --- a/src/gba/hardware.h +++ b/include/mgba/internal/gba/hardware.h @@ -6,14 +6,13 @@ #ifndef GBA_HARDWARE_H #define GBA_HARDWARE_H -#include "util/common.h" +#include CXX_GUARD_START -#include "arm/macros.h" -#include "core/log.h" -#include "core/timing.h" -#include "gba/interface.h" +#include +#include +#include #include diff --git a/src/gba/input.h b/include/mgba/internal/gba/input.h similarity index 91% rename from src/gba/input.h rename to include/mgba/internal/gba/input.h index cf2da1469..03cb8b5e0 100644 --- a/src/gba/input.h +++ b/include/mgba/internal/gba/input.h @@ -6,11 +6,11 @@ #ifndef GBA_INPUT_H #define GBA_INPUT_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/input.h" +#include extern const struct mInputPlatformInfo GBAInputInfo; diff --git a/src/gba/io.h b/include/mgba/internal/gba/io.h similarity index 98% rename from src/gba/io.h rename to include/mgba/internal/gba/io.h index b7e6aaddd..959babf05 100644 --- a/src/gba/io.h +++ b/include/mgba/internal/gba/io.h @@ -6,11 +6,11 @@ #ifndef GBA_IO_H #define GBA_IO_H -#include "util/common.h" +#include CXX_GUARD_START -#include "gba/gba.h" +#include 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); diff --git a/src/gba/memory.h b/include/mgba/internal/gba/memory.h similarity index 95% rename from src/gba/memory.h rename to include/mgba/internal/gba/memory.h index 047771764..9507f0e29 100644 --- a/src/gba/memory.h +++ b/include/mgba/internal/gba/memory.h @@ -6,16 +6,16 @@ #ifndef GBA_MEMORY_H #define GBA_MEMORY_H -#include "util/common.h" +#include CXX_GUARD_START -#include "arm/arm.h" -#include "core/timing.h" +#include -#include "gba/hardware.h" -#include "gba/savedata.h" -#include "gba/vfame.h" +#include +#include +#include +#include enum GBAMemoryRegion { REGION_BIOS = 0x0, @@ -148,6 +148,7 @@ struct GBAMemory { bool mirroring; }; +struct GBA; void GBAMemoryInit(struct GBA* gba); void GBAMemoryDeinit(struct GBA* gba); diff --git a/src/gba/overrides.h b/include/mgba/internal/gba/overrides.h similarity index 92% rename from src/gba/overrides.h rename to include/mgba/internal/gba/overrides.h index c86c0e728..4240fea2e 100644 --- a/src/gba/overrides.h +++ b/include/mgba/internal/gba/overrides.h @@ -6,11 +6,11 @@ #ifndef GBA_OVERRIDES_H #define GBA_OVERRIDES_H -#include "util/common.h" +#include CXX_GUARD_START -#include "gba/savedata.h" +#include #define IDLE_LOOP_NONE 0xFFFFFFFF diff --git a/src/gba/renderers/thread-proxy.h b/include/mgba/internal/gba/renderers/thread-proxy.h similarity index 87% rename from src/gba/renderers/thread-proxy.h rename to include/mgba/internal/gba/renderers/thread-proxy.h index 2914f203b..6fa07215a 100644 --- a/src/gba/renderers/thread-proxy.h +++ b/include/mgba/internal/gba/renderers/thread-proxy.h @@ -6,13 +6,13 @@ #ifndef VIDEO_THREAD_PROXY_H #define VIDEO_THREAD_PROXY_H -#include "util/common.h" +#include CXX_GUARD_START -#include "gba/video.h" -#include "util/threading.h" -#include "util/ring-fifo.h" +#include +#include +#include enum GBAVideoThreadProxyState { PROXY_THREAD_STOPPED = 0, diff --git a/src/gba/renderers/tile-cache.h b/include/mgba/internal/gba/renderers/tile-cache.h similarity index 94% rename from src/gba/renderers/tile-cache.h rename to include/mgba/internal/gba/renderers/tile-cache.h index 2afa25696..3e2143f35 100644 --- a/src/gba/renderers/tile-cache.h +++ b/include/mgba/internal/gba/renderers/tile-cache.h @@ -6,7 +6,7 @@ #ifndef GBA_TILE_CACHE_H #define GBA_TILE_CACHE_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/gba/renderers/video-software.h b/include/mgba/internal/gba/renderers/video-software.h similarity index 97% rename from src/gba/renderers/video-software.h rename to include/mgba/internal/gba/renderers/video-software.h index e292eb233..ba9db50f7 100644 --- a/src/gba/renderers/video-software.h +++ b/include/mgba/internal/gba/renderers/video-software.h @@ -6,12 +6,12 @@ #ifndef VIDEO_SOFTWARE_H #define VIDEO_SOFTWARE_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/core.h" -#include "gba/video.h" +#include +#include struct GBAVideoSoftwareSprite { struct GBAObj obj; diff --git a/src/gba/rr/mgm.h b/include/mgba/internal/gba/rr/mgm.h similarity index 96% rename from src/gba/rr/mgm.h rename to include/mgba/internal/gba/rr/mgm.h index f45351a7b..fd455a830 100644 --- a/src/gba/rr/mgm.h +++ b/include/mgba/internal/gba/rr/mgm.h @@ -6,11 +6,11 @@ #ifndef RR_MGM_H #define RR_MGM_H -#include "util/common.h" +#include CXX_GUARD_START -#include "gba/rr/rr.h" +#include struct GBA; struct VDir; diff --git a/src/gba/rr/rr.h b/include/mgba/internal/gba/rr/rr.h similarity index 94% rename from src/gba/rr/rr.h rename to include/mgba/internal/gba/rr/rr.h index dcc7ea782..b4fc2e627 100644 --- a/src/gba/rr/rr.h +++ b/include/mgba/internal/gba/rr/rr.h @@ -6,12 +6,12 @@ #ifndef GBA_RR_H #define GBA_RR_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" -#include "gba/serialize.h" +#include +#include struct VFile; diff --git a/src/gba/rr/vbm.h b/include/mgba/internal/gba/rr/vbm.h similarity index 89% rename from src/gba/rr/vbm.h rename to include/mgba/internal/gba/rr/vbm.h index e38f83261..66d19b76e 100644 --- a/src/gba/rr/vbm.h +++ b/include/mgba/internal/gba/rr/vbm.h @@ -6,11 +6,11 @@ #ifndef GBA_VBM_H #define GBA_VBM_H -#include "util/common.h" +#include CXX_GUARD_START -#include "gba/rr/rr.h" +#include struct GBAVBMContext { struct GBARRContext d; diff --git a/src/gba/savedata.h b/include/mgba/internal/gba/savedata.h similarity index 98% rename from src/gba/savedata.h rename to include/mgba/internal/gba/savedata.h index bd2c8fc97..2b0bbfe38 100644 --- a/src/gba/savedata.h +++ b/include/mgba/internal/gba/savedata.h @@ -6,11 +6,11 @@ #ifndef GBA_SAVEDATA_H #define GBA_SAVEDATA_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" +#include mLOG_DECLARE_CATEGORY(GBA_SAVE); diff --git a/src/gba/serialize.h b/include/mgba/internal/gba/serialize.h similarity index 98% rename from src/gba/serialize.h rename to include/mgba/internal/gba/serialize.h index 301eae0a9..fd2c191b0 100644 --- a/src/gba/serialize.h +++ b/include/mgba/internal/gba/serialize.h @@ -6,13 +6,13 @@ #ifndef GBA_SERIALIZE_H #define GBA_SERIALIZE_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/core.h" -#include "gba/gba.h" -#include "gb/serialize.h" +#include +#include +#include extern const uint32_t GBA_SAVESTATE_MAGIC; extern const uint32_t GBA_SAVESTATE_VERSION; diff --git a/src/gba/sharkport.h b/include/mgba/internal/gba/sharkport.h similarity index 94% rename from src/gba/sharkport.h rename to include/mgba/internal/gba/sharkport.h index 18bb0c64b..361d4eb44 100644 --- a/src/gba/sharkport.h +++ b/include/mgba/internal/gba/sharkport.h @@ -6,7 +6,7 @@ #ifndef GBA_SHARKPORT_H #define GBA_SHARKPORT_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/gba/sio.h b/include/mgba/internal/gba/sio.h similarity index 95% rename from src/gba/sio.h rename to include/mgba/internal/gba/sio.h index cdb0d50b7..d7b702edb 100644 --- a/src/gba/sio.h +++ b/include/mgba/internal/gba/sio.h @@ -6,12 +6,12 @@ #ifndef GBA_SIO_H #define GBA_SIO_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" -#include "gba/interface.h" +#include +#include #define MAX_GBAS 4 diff --git a/src/gba/sio/lockstep.h b/include/mgba/internal/gba/sio/lockstep.h similarity index 89% rename from src/gba/sio/lockstep.h rename to include/mgba/internal/gba/sio/lockstep.h index cecfbc733..13c181039 100644 --- a/src/gba/sio/lockstep.h +++ b/include/mgba/internal/gba/sio/lockstep.h @@ -6,13 +6,13 @@ #ifndef GBA_SIO_LOCKSTEP_H #define GBA_SIO_LOCKSTEP_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/lockstep.h" -#include "core/timing.h" -#include "gba/sio.h" +#include +#include +#include struct GBASIOLockstep { struct mLockstep d; diff --git a/src/gba/timer.h b/include/mgba/internal/gba/timer.h similarity index 93% rename from src/gba/timer.h rename to include/mgba/internal/gba/timer.h index 1edce1c9e..d031f3d4f 100644 --- a/src/gba/timer.h +++ b/include/mgba/internal/gba/timer.h @@ -6,11 +6,11 @@ #ifndef GBA_TIMER_H #define GBA_TIMER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/timing.h" +#include DECL_BITFIELD(GBATimerFlags, uint32_t); DECL_BITS(GBATimerFlags, PrescaleBits, 0, 4); diff --git a/src/gba/vfame.h b/include/mgba/internal/gba/vfame.h similarity index 97% rename from src/gba/vfame.h rename to include/mgba/internal/gba/vfame.h index fa226efa3..eff24a039 100644 --- a/src/gba/vfame.h +++ b/include/mgba/internal/gba/vfame.h @@ -9,7 +9,7 @@ #ifndef GBA_VFAME_H #define GBA_VFAME_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/gba/video.h b/include/mgba/internal/gba/video.h similarity index 98% rename from src/gba/video.h rename to include/mgba/internal/gba/video.h index b5b1d810b..3a1aa14e8 100644 --- a/src/gba/video.h +++ b/include/mgba/internal/gba/video.h @@ -6,12 +6,12 @@ #ifndef GBA_VIDEO_H #define GBA_VIDEO_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/timing.h" -#include "gba/memory.h" +#include +#include mLOG_DECLARE_CATEGORY(GBA_VIDEO); diff --git a/src/lr35902/debugger/cli-debugger.h b/include/mgba/internal/lr35902/debugger/cli-debugger.h similarity index 93% rename from src/lr35902/debugger/cli-debugger.h rename to include/mgba/internal/lr35902/debugger/cli-debugger.h index a229f03cc..995f10649 100644 --- a/src/lr35902/debugger/cli-debugger.h +++ b/include/mgba/internal/lr35902/debugger/cli-debugger.h @@ -6,7 +6,7 @@ #ifndef LR35902_CLI_DEBUGGER_H #define LR35902_CLI_DEBUGGER_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/lr35902/debugger/debugger.h b/include/mgba/internal/lr35902/debugger/debugger.h similarity index 92% rename from src/lr35902/debugger/debugger.h rename to include/mgba/internal/lr35902/debugger/debugger.h index 9697f5fc5..06801d77b 100644 --- a/src/lr35902/debugger/debugger.h +++ b/include/mgba/internal/lr35902/debugger/debugger.h @@ -6,11 +6,11 @@ #ifndef LR35902_DEBUGGER_H #define LR35902_DEBUGGER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "debugger/debugger.h" +#include struct LR35902DebugBreakpoint { uint16_t address; diff --git a/src/lr35902/emitter-lr35902.h b/include/mgba/internal/lr35902/emitter-lr35902.h similarity index 100% rename from src/lr35902/emitter-lr35902.h rename to include/mgba/internal/lr35902/emitter-lr35902.h diff --git a/src/lr35902/isa-lr35902.h b/include/mgba/internal/lr35902/isa-lr35902.h similarity index 94% rename from src/lr35902/isa-lr35902.h rename to include/mgba/internal/lr35902/isa-lr35902.h index 60e278f4e..151524a43 100644 --- a/src/lr35902/isa-lr35902.h +++ b/include/mgba/internal/lr35902/isa-lr35902.h @@ -6,7 +6,7 @@ #ifndef ISA_LR35902_H #define ISA_LR35902_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/lr35902/lr35902.h b/include/mgba/internal/lr35902/lr35902.h similarity index 96% rename from src/lr35902/lr35902.h rename to include/mgba/internal/lr35902/lr35902.h index f2c0492c7..59811cc8b 100644 --- a/src/lr35902/lr35902.h +++ b/include/mgba/internal/lr35902/lr35902.h @@ -6,12 +6,12 @@ #ifndef LR35902_H #define LR35902_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/cpu.h" -#include "lr35902/isa-lr35902.h" +#include +#include struct LR35902Core; diff --git a/src/arm/arm.c b/src/arm/arm.c index 9fc35de71..618f34750 100644 --- a/src/arm/arm.c +++ b/src/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 -#include "isa-arm.h" -#include "isa-inlines.h" -#include "isa-thumb.h" +#include +#include +#include static inline enum RegisterBank _ARMSelectBank(enum PrivilegeMode); diff --git a/src/arm/debugger/cli-debugger.c b/src/arm/debugger/cli-debugger.c index dbee4c538..87a1655c5 100644 --- a/src/arm/debugger/cli-debugger.c +++ b/src/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 -#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 +#include +#include +#include +#include static void _printStatus(struct CLIDebuggerSystem*); diff --git a/src/arm/debugger/debugger.c b/src/arm/debugger/debugger.c index ba9204726..76b474841 100644 --- a/src/arm/debugger/debugger.c +++ b/src/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 -#include "arm/arm.h" -#include "arm/isa-inlines.h" -#include "arm/debugger/memory-debugger.h" -#include "core/core.h" +#include +#include +#include +#include DEFINE_VECTOR(ARMDebugBreakpointList, struct ARMDebugBreakpoint); DEFINE_VECTOR(ARMDebugWatchpointList, struct ARMDebugWatchpoint); diff --git a/src/arm/debugger/memory-debugger.c b/src/arm/debugger/memory-debugger.c index 2844af5e6..faa8651f4 100644 --- a/src/arm/debugger/memory-debugger.c +++ b/src/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 -#include "arm/debugger/debugger.h" +#include -#include "util/math.h" +#include #include diff --git a/src/arm/decoder-arm.c b/src/arm/decoder-arm.c index 3b082a0d2..bfbf65365 100644 --- a/src/arm/decoder-arm.c +++ b/src/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 -#include "decoder-inlines.h" -#include "emitter-arm.h" -#include "isa-inlines.h" +#include +#include +#include #define ADDR_MODE_1_SHIFT(OP) \ info->op3.reg = opcode & 0x0000000F; \ diff --git a/src/arm/decoder-thumb.c b/src/arm/decoder-thumb.c index 707324023..a53da00e9 100644 --- a/src/arm/decoder-thumb.c +++ b/src/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 -#include "decoder-inlines.h" -#include "emitter-thumb.h" -#include "isa-inlines.h" +#include +#include +#include #define DEFINE_THUMB_DECODER(NAME, MNEMONIC, BODY) \ static void _ThumbDecode ## NAME (uint16_t opcode, struct ARMInstructionInfo* info) { \ diff --git a/src/arm/decoder.c b/src/arm/decoder.c index 8e5ef3f8d..5411c20f3 100644 --- a/src/arm/decoder.c +++ b/src/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 -#include "decoder-inlines.h" +#include #define ADVANCE(AMOUNT) \ if (AMOUNT > blen) { \ diff --git a/src/arm/isa-arm.c b/src/arm/isa-arm.c index d1f7b7c29..85323a1a1 100644 --- a/src/arm/isa-arm.c +++ b/src/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 -#include "arm.h" -#include "emitter-arm.h" -#include "isa-inlines.h" +#include +#include +#include #define PSR_USER_MASK 0xF0000000 #define PSR_PRIV_MASK 0x000000CF diff --git a/src/arm/isa-thumb.c b/src/arm/isa-thumb.c index 7c587f618..54faf6ddc 100644 --- a/src/arm/isa-thumb.c +++ b/src/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 -#include "isa-inlines.h" -#include "emitter-thumb.h" +#include +#include // Instruction definitions // Beware pre-processor insanity diff --git a/src/core/cheats.c b/src/core/cheats.c index efcbf4aa0..fe6e59c99 100644 --- a/src/core/cheats.c +++ b/src/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 -#include "core/core.h" -#include "util/string.h" -#include "util/vfs.h" +#include +#include +#include #define MAX_LINE_LENGTH 128 diff --git a/src/core/config.c b/src/core/config.c index d66baddb3..0a2d146b3 100644 --- a/src/core/config.c +++ b/src/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 -#include "core/version.h" -#include "util/formatting.h" -#include "util/string.h" -#include "util/vfs.h" +#include +#include +#include +#include #include @@ -24,7 +24,7 @@ #endif #ifdef _3DS -#include "platform/3ds/3ds-vfs.h" +#include #endif #define SECTION_NAME_MAX 128 diff --git a/src/core/core.c b/src/core/core.c index 835a88c25..433c213b8 100644 --- a/src/core/core.c +++ b/src/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 -#include "core/log.h" -#include "core/serialize.h" -#include "util/vfs.h" +#include +#include +#include #ifdef M_CORE_GB -#include "gb/core.h" -#include "gb/gb.h" +#include +// TODO: Fix layering violation +#include #endif #ifdef M_CORE_GBA -#include "gba/core.h" -#include "gba/gba.h" +#include +#include #endif static struct mCoreFilter { @@ -62,7 +63,7 @@ enum mPlatform mCoreIsCompatible(struct VFile* vf) { } #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 -#include "util/png-io.h" +#include #ifdef PSP2 #include diff --git a/src/core/directories.c b/src/core/directories.c index db4ec1b26..ca261dbd9 100644 --- a/src/core/directories.c +++ b/src/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 -#include "core/config.h" -#include "util/vfs.h" +#include +#include #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 void mDirectorySetInit(struct mDirectorySet* dirs) { diff --git a/src/core/input.c b/src/core/input.c index 4614e3549..86145f176 100644 --- a/src/core/input.c +++ b/src/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 -#include "util/configuration.h" -#include "util/table.h" +#include +#include #include diff --git a/src/core/interface.c b/src/core/interface.c index 272afd948..66b372800 100644 --- a/src/core/interface.c +++ b/src/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 -#include "core/core.h" +#include #include static time_t _rtcGenericCallback(struct mRTCSource* source) { diff --git a/src/core/library.c b/src/core/library.c index 995772cf9..425405bac 100644 --- a/src/core/library.c +++ b/src/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 -#include "util/vfs.h" +#include DEFINE_VECTOR(mLibraryListing, struct mLibraryEntry); diff --git a/src/core/lockstep.c b/src/core/lockstep.c index 28bc03355..40b1f1e2e 100644 --- a/src/core/lockstep.c +++ b/src/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 void mLockstepInit(struct mLockstep* lockstep) { lockstep->attached = 0; diff --git a/src/core/log.c b/src/core/log.c index 125907e9a..65ec99924 100644 --- a/src/core/log.c +++ b/src/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 -#include "core/thread.h" +#include #define MAX_CATEGORY 64 diff --git a/src/core/rewind.c b/src/core/rewind.c index e48b2eb8b..56a59e47d 100644 --- a/src/core/rewind.c +++ b/src/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 -#include "core/core.h" -#include "util/patch-fast.h" -#include "util/vfs.h" +#include +#include +#include DEFINE_VECTOR(mCoreRewindPatches, struct PatchFast); diff --git a/src/core/serialize.c b/src/core/serialize.c index 14a3795ac..f5b143fec 100644 --- a/src/core/serialize.c +++ b/src/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 -#include "core/core.h" -#include "core/cheats.h" -#include "util/memory.h" -#include "util/vfs.h" +#include +#include +#include +#include #ifdef USE_PNG -#include "util/png-io.h" +#include #include #include #endif diff --git a/src/core/sync.c b/src/core/sync.c index 640628024..5fc5e72d9 100644 --- a/src/core/sync.c +++ b/src/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 static void _changeVideoSync(struct mCoreSync* sync, bool frameOn) { // Make sure the video thread can process events while the GBA thread is paused diff --git a/src/core/test/core.c b/src/core/test/core.c index 12f67a900..3fcebaf31 100644 --- a/src/core/test/core.c +++ b/src/core/test/core.c @@ -5,8 +5,8 @@ * 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 +#include #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 M_TEST_DEFINE(findNullPath) { diff --git a/src/core/test/core.h b/src/core/test/core.h index f5cbd16a0..add2a4c02 100644 --- a/src/core/test/core.h +++ b/src/core/test/core.h @@ -5,7 +5,7 @@ * 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 int TestRunCore(void); diff --git a/src/core/thread.c b/src/core/thread.c index 4c7eb90eb..f3509071e 100644 --- a/src/core/thread.c +++ b/src/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 -#include "core/core.h" -#include "util/patch.h" -#include "util/vfs.h" - -#include "feature/commandline.h" +#include +#include +#include #include diff --git a/src/core/tile-cache.c b/src/core/tile-cache.c index 17572fe0b..85c2f7032 100644 --- a/src/core/tile-cache.c +++ b/src/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 -#include "util/memory.h" +#include void mTileCacheInit(struct mTileCache* cache) { // TODO: Reconfigurable cache for space savings diff --git a/src/core/timing.c b/src/core/timing.c index 384d92617..d7e7653bd 100644 --- a/src/core/timing.c +++ b/src/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 void mTimingInit(struct mTiming* timing, int32_t* relativeCycles, int32_t* nextEvent) { timing->root = NULL; diff --git a/src/core/version.c.in b/src/core/version.c.in index 98fcd6428..b8c87fb70 100644 --- a/src/core/version.c.in +++ b/src/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 const char* const gitCommit = "${GIT_COMMIT}"; const char* const gitCommitShort = "${GIT_COMMIT_SHORT}"; diff --git a/src/debugger/cli-debugger.c b/src/debugger/cli-debugger.c index 8f5a7d6b6..d5b6dc535 100644 --- a/src/debugger/cli-debugger.c +++ b/src/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 -#include "core/core.h" -#include "core/version.h" -#include "debugger/parser.h" -#include "util/string.h" +#include +#include +#include +#include #if !defined(NDEBUG) && !defined(_WIN32) #include diff --git a/src/debugger/debugger.c b/src/debugger/debugger.c index 6ddbc7dcb..0e7e3fc1a 100644 --- a/src/debugger/debugger.c +++ b/src/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 -#include "core/core.h" +#include -#include "debugger/cli-debugger.h" +#include #ifdef USE_GDB_STUB -#include "debugger/gdb-stub.h" +#include #endif const uint32_t DEBUGGER_ID = 0xDEADBEEF; diff --git a/src/debugger/gdb-stub.c b/src/debugger/gdb-stub.c index 227418176..b497c24d7 100644 --- a/src/debugger/gdb-stub.c +++ b/src/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 -#include "arm/debugger/debugger.h" -#include "arm/isa-inlines.h" -#include "core/core.h" -#include "gba/memory.h" +#include +#include +#include +#include #include diff --git a/src/debugger/parser.c b/src/debugger/parser.c index 4d3cfd6b2..a755af505 100644 --- a/src/debugger/parser.c +++ b/src/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 -#include "util/string.h" +#include static struct LexVector* _lexOperator(struct LexVector* lv, char operator) { struct LexVector* lvNext = malloc(sizeof(struct LexVector)); diff --git a/src/feature/commandline.c b/src/feature/commandline.c index 9fc75bacb..ae9f72c18 100644 --- a/src/feature/commandline.c +++ b/src/feature/commandline.c @@ -5,13 +5,13 @@ * 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 +#include +#include #include #ifdef _MSC_VER -#include "platform/windows/getopt.h" +#include #else #include #endif diff --git a/src/feature/commandline.h b/src/feature/commandline.h index 0b672eb34..322c8e87b 100644 --- a/src/feature/commandline.h +++ b/src/feature/commandline.h @@ -6,11 +6,11 @@ #ifndef COMMAND_LINE_H #define COMMAND_LINE_H -#include "util/common.h" +#include CXX_GUARD_START -#include "debugger/debugger.h" +#include struct mArguments { char* fname; diff --git a/src/feature/editline/cli-el-backend.c b/src/feature/editline/cli-el-backend.c index ac0a935d4..530019b03 100644 --- a/src/feature/editline/cli-el-backend.c +++ b/src/feature/editline/cli-el-backend.c @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "cli-el-backend.h" -#include "core/version.h" +#include #include diff --git a/src/feature/editline/cli-el-backend.h b/src/feature/editline/cli-el-backend.h index 68fb32a1c..89ceec641 100644 --- a/src/feature/editline/cli-el-backend.h +++ b/src/feature/editline/cli-el-backend.h @@ -6,11 +6,11 @@ #ifndef CLI_EL_BACKEND_H #define CLI_EL_BACKEND_H -#include "util/common.h" +#include CXX_GUARD_START -#include "debugger/cli-debugger.h" +#include #include diff --git a/src/feature/ffmpeg/ffmpeg-encoder.c b/src/feature/ffmpeg/ffmpeg-encoder.c index ac239f650..a902d6abf 100644 --- a/src/feature/ffmpeg/ffmpeg-encoder.c +++ b/src/feature/ffmpeg/ffmpeg-encoder.c @@ -5,8 +5,8 @@ * 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 +#include #include #include diff --git a/src/feature/ffmpeg/ffmpeg-encoder.h b/src/feature/ffmpeg/ffmpeg-encoder.h index b8017769f..feeeddc77 100644 --- a/src/feature/ffmpeg/ffmpeg-encoder.h +++ b/src/feature/ffmpeg/ffmpeg-encoder.h @@ -6,11 +6,11 @@ #ifndef FFMPEG_ENCODER #define FFMPEG_ENCODER -#include "util/common.h" +#include CXX_GUARD_START -#include "gba/gba.h" +#include #include #include diff --git a/src/feature/gui/gui-config.c b/src/feature/gui/gui-config.c index 16f13a2f9..9d4e39fb2 100644 --- a/src/feature/gui/gui-config.c +++ b/src/feature/gui/gui-config.c @@ -5,13 +5,13 @@ * 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 +#include #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 +#include +#include #ifndef GUI_MAX_INPUTS #define GUI_MAX_INPUTS 7 diff --git a/src/feature/gui/gui-config.h b/src/feature/gui/gui-config.h index 539bd109e..f869e1c46 100644 --- a/src/feature/gui/gui-config.h +++ b/src/feature/gui/gui-config.h @@ -6,7 +6,7 @@ #ifndef GUI_CONFIG_H #define GUI_CONFIG_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/feature/gui/gui-runner.c b/src/feature/gui/gui-runner.c index 2a0ee06a7..0fce5b791 100644 --- a/src/feature/gui/gui-runner.c +++ b/src/feature/gui/gui-runner.c @@ -5,18 +5,18 @@ * 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 +#include #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 +#include +#include +#include +#include +#include +#include +#include +#include #ifdef _3DS #include <3ds.h> diff --git a/src/feature/gui/gui-runner.h b/src/feature/gui/gui-runner.h index 1293b1e97..0a288951f 100644 --- a/src/feature/gui/gui-runner.h +++ b/src/feature/gui/gui-runner.h @@ -6,15 +6,15 @@ #ifndef GUI_RUNNER_H #define GUI_RUNNER_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/config.h" +#include #include "feature/gui/remap.h" -#include "gba/hardware.h" -#include "util/circle-buffer.h" -#include "util/gui.h" +#include +#include +#include enum mGUIInput { mGUI_INPUT_INCREASE_BRIGHTNESS = GUI_INPUT_USER_START, diff --git a/src/feature/gui/remap.c b/src/feature/gui/remap.c index 2db8517fa..b17560319 100644 --- a/src/feature/gui/remap.c +++ b/src/feature/gui/remap.c @@ -5,8 +5,8 @@ * 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 +#include void mGUIRemapKeys(struct GUIParams* params, struct mInputMap* map, const struct GUIInputKeys* keys) { struct GUIMenu menu = { diff --git a/src/feature/gui/remap.h b/src/feature/gui/remap.h index de0cd6e8a..a604c3950 100644 --- a/src/feature/gui/remap.h +++ b/src/feature/gui/remap.h @@ -6,7 +6,7 @@ #ifndef GUI_REMAP_H #define GUI_REMAP_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/feature/imagemagick/imagemagick-gif-encoder.c b/src/feature/imagemagick/imagemagick-gif-encoder.c index ccd8ea426..faa44d9d9 100644 --- a/src/feature/imagemagick/imagemagick-gif-encoder.c +++ b/src/feature/imagemagick/imagemagick-gif-encoder.c @@ -5,9 +5,9 @@ * 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 +#include +#include static void _magickPostVideoFrame(struct mAVStream*, const color_t* pixels, size_t stride); static void _magickVideoDimensionsChanged(struct mAVStream*, unsigned width, unsigned height); diff --git a/src/feature/imagemagick/imagemagick-gif-encoder.h b/src/feature/imagemagick/imagemagick-gif-encoder.h index 366c8f6b7..13505e6db 100644 --- a/src/feature/imagemagick/imagemagick-gif-encoder.h +++ b/src/feature/imagemagick/imagemagick-gif-encoder.h @@ -6,11 +6,11 @@ #ifndef IMAGEMAGICK_GIF_ENCODER #define IMAGEMAGICK_GIF_ENCODER -#include "util/common.h" +#include CXX_GUARD_START -#include "core/interface.h" +#include #define MAGICKCORE_HDRI_ENABLE 0 #define MAGICKCORE_QUANTUM_DEPTH 8 diff --git a/src/gb/audio.c b/src/gb/audio.c index 14f501096..183927730 100644 --- a/src/gb/audio.c +++ b/src/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 -#include "core/interface.h" -#include "core/sync.h" -#include "gb/gb.h" -#include "gb/serialize.h" -#include "gb/io.h" +#include +#include +#include +#include +#include +#include #ifdef _3DS #define blip_add_delta blip_add_delta_fast diff --git a/src/gb/cheats.c b/src/gb/cheats.c index a29711c61..118ddde20 100644 --- a/src/gb/cheats.c +++ b/src/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 -#include "core/core.h" -#include "gb/gb.h" -#include "gb/memory.h" -#include "util/string.h" +#include +#include +#include +#include DEFINE_VECTOR(GBCheatPatchList, struct GBCheatPatch); diff --git a/src/gb/core.c b/src/gb/core.c index fabe88f8c..6380f9ff1 100644 --- a/src/gb/core.c +++ b/src/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 -#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include struct GBCore { struct mCore d; diff --git a/src/gb/extra/cli.c b/src/gb/extra/cli.c index 0f8f7d945..78e10a1b6 100644 --- a/src/gb/extra/cli.c +++ b/src/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 -#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 +#include +#include +#include +#include +#include static void _GBCLIDebuggerInit(struct CLIDebuggerSystem*); static bool _GBCLIDebuggerCustom(struct CLIDebuggerSystem*); diff --git a/src/gb/gb.c b/src/gb/gb.c index 6a47ccf63..e53a7e579 100644 --- a/src/gb/gb.c +++ b/src/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 -#include "gb/io.h" -#include "gb/mbc.h" +#include +#include +#include -#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 +#include +#include +#include +#include +#include +#include #define CLEANUP_THRESHOLD 15 diff --git a/src/gb/io.c b/src/gb/io.c index 4a3d5e59d..82f3855ef 100644 --- a/src/gb/io.c +++ b/src/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 -#include "gb/gb.h" -#include "gb/sio.h" -#include "gb/serialize.h" +#include +#include +#include mLOG_DEFINE_CATEGORY(GB_IO, "GB I/O"); diff --git a/src/gb/mbc.c b/src/gb/mbc.c index 9357fcbe3..0ae353b05 100644 --- a/src/gb/mbc.c +++ b/src/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 -#include "gb/gb.h" -#include "gb/memory.h" -#include "util/vfs.h" +#include +#include +#include +#include mLOG_DEFINE_CATEGORY(GB_MBC, "GB MBC"); diff --git a/src/gb/memory.c b/src/gb/memory.c index 3b2656001..0334e136e 100644 --- a/src/gb/memory.c +++ b/src/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 -#include "core/interface.h" -#include "gb/gb.h" -#include "gb/io.h" -#include "gb/mbc.h" -#include "gb/serialize.h" +#include +#include +#include +#include +#include +#include -#include "util/memory.h" +#include mLOG_DEFINE_CATEGORY(GB_MEM, "GB Memory"); diff --git a/src/gb/overrides.c b/src/gb/overrides.c index 9e19b7d87..d86f08f5f 100644 --- a/src/gb/overrides.c +++ b/src/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 -#include "gb/gb.h" +#include -#include "util/configuration.h" -#include "util/crc32.h" +#include +#include static const struct GBCartridgeOverride _overrides[] = { // None yet diff --git a/src/gb/renderers/software.c b/src/gb/renderers/software.c index 1e6f914fc..61daa9f98 100644 --- a/src/gb/renderers/software.c +++ b/src/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 -#include "core/tile-cache.h" -#include "gb/io.h" -#include "util/memory.h" +#include +#include +#include static void GBVideoSoftwareRendererInit(struct GBVideoRenderer* renderer, enum GBModel model); static void GBVideoSoftwareRendererDeinit(struct GBVideoRenderer* renderer); diff --git a/src/gb/renderers/tile-cache.c b/src/gb/renderers/tile-cache.c index b10ee972d..4780649b8 100644 --- a/src/gb/renderers/tile-cache.c +++ b/src/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 -#include "core/tile-cache.h" -#include "gb/video.h" -#include "gb/renderers/tile-cache.h" +#include +#include +#include void GBVideoTileCacheInit(struct mTileCache* cache) { mTileCacheInit(cache); diff --git a/src/gb/serialize.c b/src/gb/serialize.c index abec007ac..61b4b5a09 100644 --- a/src/gb/serialize.c +++ b/src/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 -#include "gb/io.h" -#include "gb/timer.h" +#include +#include +#include mLOG_DEFINE_CATEGORY(GB_STATE, "GB Savestate"); diff --git a/src/gb/sio.c b/src/gb/sio.c index f25cb3b96..944064752 100644 --- a/src/gb/sio.c +++ b/src/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 -#include "gb/gb.h" -#include "gb/io.h" -#include "gb/serialize.h" +#include +#include +#include mLOG_DEFINE_CATEGORY(GB_SIO, "GB Serial I/O"); diff --git a/src/gb/sio/lockstep.c b/src/gb/sio/lockstep.c index d52401a66..c60978ffe 100644 --- a/src/gb/sio/lockstep.c +++ b/src/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 -#include "gb/gb.h" -#include "gb/io.h" +#include +#include #define LOCKSTEP_INCREMENT 512 diff --git a/src/gb/test/core.c b/src/gb/test/core.c index c5ed2fdfa..09f9ca25a 100644 --- a/src/gb/test/core.c +++ b/src/gb/test/core.c @@ -5,10 +5,10 @@ * 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 +#include +#include +#include M_TEST_DEFINE(create) { struct mCore* core = GBCoreCreate(); diff --git a/src/gb/test/gb.h b/src/gb/test/gb.h index 2bb574f01..572a21466 100644 --- a/src/gb/test/gb.h +++ b/src/gb/test/gb.h @@ -5,7 +5,7 @@ * 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 int TestRunGB(void); diff --git a/src/gb/test/mbc.c b/src/gb/test/mbc.c index d4e94b401..a9448892b 100644 --- a/src/gb/test/mbc.c +++ b/src/gb/test/mbc.c @@ -5,11 +5,11 @@ * 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 +#include +#include +#include +#include M_TEST_SUITE_SETUP(GBMBC) { struct VFile* vf = VFileMemChunk(NULL, 2048); diff --git a/src/gb/test/memory.c b/src/gb/test/memory.c index 35768916a..f4e0ee642 100644 --- a/src/gb/test/memory.c +++ b/src/gb/test/memory.c @@ -5,11 +5,11 @@ * 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 +#include +#include +#include +#include M_TEST_SUITE_SETUP(GBMemory) { struct VFile* vf = VFileMemChunk(NULL, GB_SIZE_CART_BANK0 * 4); diff --git a/src/gb/test/rtc.c b/src/gb/test/rtc.c index 8e6010775..5ad393a64 100644 --- a/src/gb/test/rtc.c +++ b/src/gb/test/rtc.c @@ -5,11 +5,11 @@ * 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 +#include +#include +#include +#include struct GBRTCTest { struct mRTCSource d; diff --git a/src/gb/timer.c b/src/gb/timer.c index 3426cafad..0cd2571a9 100644 --- a/src/gb/timer.c +++ b/src/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 -#include "gb/gb.h" -#include "gb/io.h" -#include "gb/serialize.h" +#include +#include +#include void _GBTimerIRQ(struct mTiming* timing, void* context, uint32_t cyclesLate) { UNUSED(timing); diff --git a/src/gb/video.c b/src/gb/video.c index 37e58b5a8..cfabfe4ce 100644 --- a/src/gb/video.c +++ b/src/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 -#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 +#include +#include +#include +#include +#include +#include -#include "util/memory.h" +#include static void GBVideoDummyRendererInit(struct GBVideoRenderer* renderer, enum GBModel model); static void GBVideoDummyRendererDeinit(struct GBVideoRenderer* renderer); diff --git a/src/gba/audio.c b/src/gba/audio.c index 9f01889ed..52d99d883 100644 --- a/src/gba/audio.c +++ b/src/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 -#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 +#include +#include +#include +#include +#include +#include +#include #ifdef _3DS #define blip_add_delta blip_add_delta_fast diff --git a/src/gba/bios.c b/src/gba/bios.c index a61cf88d8..83e43b302 100644 --- a/src/gba/bios.c +++ b/src/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 -#include "arm/isa-inlines.h" -#include "arm/macros.h" -#include "gba/gba.h" -#include "gba/io.h" -#include "gba/memory.h" +#include +#include +#include +#include +#include const uint32_t GBA_BIOS_CHECKSUM = 0xBAAE187F; const uint32_t GBA_DS_BIOS_CHECKSUM = 0xBAAE1880; diff --git a/src/gba/cheats.c b/src/gba/cheats.c index 8b5f5804b..2e1a30b54 100644 --- a/src/gba/cheats.c +++ b/src/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 -#include "core/core.h" +#include +#include +#include #include "gba/cheats/gameshark.h" #include "gba/cheats/parv3.h" -#include "gba/gba.h" -#include "util/string.h" #define MAX_LINE_LENGTH 128 diff --git a/src/gba/cheats/codebreaker.c b/src/gba/cheats/codebreaker.c index 5c7f6fb58..bca859b68 100644 --- a/src/gba/cheats/codebreaker.c +++ b/src/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 -#include "gba/gba.h" -#include "gba/io.h" -#include "util/string.h" +#include +#include +#include static void _cbLoadByteswap(uint8_t* buffer, uint32_t op1, uint16_t op2) { buffer[0] = op1 >> 24; diff --git a/src/gba/cheats/gameshark.c b/src/gba/cheats/gameshark.c index 58dcb749c..1fc476aff 100644 --- a/src/gba/cheats/gameshark.c +++ b/src/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 #include "gba/cheats/parv3.h" -#include "gba/gba.h" -#include "util/string.h" +#include +#include const uint32_t GBACheatGameSharkSeeds[4] = { 0x09F4FBBD, 0x9681884A, 0x352027E9, 0xF3DEE5A7 }; diff --git a/src/gba/cheats/gameshark.h b/src/gba/cheats/gameshark.h index 86736f492..af4d10469 100644 --- a/src/gba/cheats/gameshark.h +++ b/src/gba/cheats/gameshark.h @@ -6,14 +6,13 @@ #ifndef GBA_CHEATS_GAMESHARK_H #define GBA_CHEATS_GAMESHARK_H -#include "util/common.h" +#include 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); diff --git a/src/gba/cheats/parv3.c b/src/gba/cheats/parv3.c index 5cad2b342..ccd6c34b0 100644 --- a/src/gba/cheats/parv3.c +++ b/src/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 #include "gba/cheats/gameshark.h" -#include "gba/gba.h" -#include "util/string.h" +#include +#include const uint32_t GBACheatProActionReplaySeeds[4] = { 0x7AA9648F, 0x7FAE6994, 0xC0EFAAD5, 0x42712C57 }; diff --git a/src/gba/cheats/parv3.h b/src/gba/cheats/parv3.h index 2723d673f..814f9b1df 100644 --- a/src/gba/cheats/parv3.h +++ b/src/gba/cheats/parv3.h @@ -6,14 +6,13 @@ #ifndef GBA_CHEATS_PARV3_H #define GBA_CHEATS_PARV3_H -#include "util/common.h" +#include 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); diff --git a/src/gba/core.c b/src/gba/core.c index a3f5b4441..52b7be0d9 100644 --- a/src/gba/core.c +++ b/src/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 -#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 +#include +#include +#include +#include +#include +#include #ifndef DISABLE_THREADING -#include "gba/renderers/thread-proxy.h" +#include #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 +#include +#include +#include +#include +#include struct GBACore { struct mCore d; diff --git a/src/gba/dma.c b/src/gba/dma.c index 7560bdb2f..5c5499ebf 100644 --- a/src/gba/dma.c +++ b/src/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 -#include "gba/gba.h" -#include "gba/io.h" +#include +#include static void _dmaEvent(struct mTiming* timing, void* context, uint32_t cyclesLate); diff --git a/src/gba/extra/cli.c b/src/gba/extra/cli.c index ca16a9117..a9ad7841b 100644 --- a/src/gba/extra/cli.c +++ b/src/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 -#include "arm/debugger/cli-debugger.h" -#include "core/serialize.h" -#include "gba/io.h" -#include "gba/serialize.h" +#include +#include +#include +#include +#include +#include static void _GBACLIDebuggerInit(struct CLIDebuggerSystem*); static bool _GBACLIDebuggerCustom(struct CLIDebuggerSystem*); diff --git a/src/gba/gba.c b/src/gba/gba.c index e1c379fc6..857552ed2 100644 --- a/src/gba/gba.c +++ b/src/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 -#include "core/thread.h" +#include +#include +#include -#include "arm/decoder.h" -#include "arm/debugger/debugger.h" -#include "arm/isa-inlines.h" +#include +#include +#include +#include +#include -#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 "util/crc32.h" -#include "util/memory.h" -#include "util/math.h" -#include "util/patch.h" -#include "util/vfs.h" +#include +#include +#include +#include +#include mLOG_DEFINE_CATEGORY(GBA, "GBA"); mLOG_DEFINE_CATEGORY(GBA_DEBUG, "GBA Debug"); diff --git a/src/gba/hardware.c b/src/gba/hardware.c index a47339ba7..5c9032de4 100644 --- a/src/gba/hardware.c +++ b/src/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 -#include "gba/io.h" -#include "gba/serialize.h" -#include "util/formatting.h" -#include "util/hash.h" +#include +#include +#include +#include +#include mLOG_DEFINE_CATEGORY(GBA_HW, "GBA Pak Hardware"); diff --git a/src/gba/hle-bios.c b/src/gba/hle-bios.c index eff5e682f..be450acd4 100644 --- a/src/gba/hle-bios.c +++ b/src/gba/hle-bios.c @@ -1,6 +1,6 @@ #include "hle-bios.h" -#include "gba/memory.h" +#include const uint8_t hleBios[SIZE_BIOS] = { 0x06, 0x00, 0x00, 0xea, 0xfe, 0xff, 0xff, 0xea, 0x0b, 0x00, 0x00, 0xea, diff --git a/src/gba/hle-bios.h b/src/gba/hle-bios.h index a696d7f6b..cc15e2f5c 100644 --- a/src/gba/hle-bios.h +++ b/src/gba/hle-bios.h @@ -6,7 +6,7 @@ #ifndef HLE_BIOS_H #define HLE_BIOS_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/gba/hle-bios.make b/src/gba/hle-bios.make index 20c2b50e3..1022c4c12 100644 --- a/src/gba/hle-bios.make +++ b/src/gba/hle-bios.make @@ -13,6 +13,6 @@ hle-bios.bin: hle-bios.o hle-bios.c: hle-bios.bin echo '#include "hle-bios.h"' > $@ echo >> $@ - echo '#include "gba/memory.h"' >> $@ + echo '#include ' >> $@ echo >> $@ xxd -i $< | sed -e 's/unsigned char hle_bios_bin\[\]/const uint8_t hleBios[SIZE_BIOS]/' | grep -v hle_bios_bin_len >> $@ diff --git a/src/gba/input.c b/src/gba/input.c index e21d0b774..c478e4a05 100644 --- a/src/gba/input.c +++ b/src/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 -#include "gba/interface.h" +#include const struct mInputPlatformInfo GBAInputInfo = { .platformName = "gba", diff --git a/src/gba/io.c b/src/gba/io.c index c705a3cc3..c788fb243 100644 --- a/src/gba/io.c +++ b/src/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 -#include "gba/dma.h" -#include "gba/rr/rr.h" -#include "gba/serialize.h" -#include "gba/sio.h" -#include "gba/video.h" +#include +#include +#include +#include +#include mLOG_DEFINE_CATEGORY(GBA_IO, "GBA I/O"); diff --git a/src/gba/memory.c b/src/gba/memory.c index 53ceeb3e9..674ba5a7d 100644 --- a/src/gba/memory.c +++ b/src/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 -#include "arm/decoder.h" -#include "gba/dma.h" -#include "gba/hardware.h" -#include "gba/io.h" -#include "gba/serialize.h" +#include +#include +#include +#include +#include +#include #include "gba/hle-bios.h" -#include "util/math.h" -#include "util/memory.h" -#include "util/vfs.h" + +#include +#include +#include #define IDLE_LOOP_THRESHOLD 10000 diff --git a/src/gba/overrides.c b/src/gba/overrides.c index c83f3d9c0..787690945 100644 --- a/src/gba/overrides.c +++ b/src/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 -#include "gba/gba.h" -#include "gba/hardware.h" +#include +#include -#include "util/configuration.h" +#include static const struct GBACartridgeOverride _overrides[] = { // Advance Wars diff --git a/src/gba/renderers/software-bg.c b/src/gba/renderers/software-bg.c index ef0c69413..f22a3a589 100644 --- a/src/gba/renderers/software-bg.c +++ b/src/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 #define MODE_2_COORD_OVERFLOW \ localX = x & (sizeAdjusted - 1); \ diff --git a/src/gba/renderers/software-mode0.c b/src/gba/renderers/software-mode0.c index 704ef3d61..74db03180 100644 --- a/src/gba/renderers/software-mode0.c +++ b/src/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 #define BACKGROUND_TEXT_SELECT_CHARACTER \ localX = tileX * 8 + inX; \ diff --git a/src/gba/renderers/software-obj.c b/src/gba/renderers/software-obj.c index fccc108c0..f3ee2bd49 100644 --- a/src/gba/renderers/software-obj.c +++ b/src/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); \ diff --git a/src/gba/renderers/software-private.h b/src/gba/renderers/software-private.h index b387e78bc..582af7329 100644 --- a/src/gba/renderers/software-private.h +++ b/src/gba/renderers/software-private.h @@ -6,7 +6,8 @@ #ifndef SOFTWARE_PRIVATE_H #define SOFTWARE_PRIVATE_H -#include "video-software.h" +#include +#include #ifdef NDEBUG #define VIDEO_CHECKS false diff --git a/src/gba/renderers/thread-proxy.c b/src/gba/renderers/thread-proxy.c index 1221dec5c..15c8bba0e 100644 --- a/src/gba/renderers/thread-proxy.c +++ b/src/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 -#include "core/tile-cache.h" -#include "gba/io.h" -#include "gba/renderers/tile-cache.h" +#include +#include +#include -#include "util/memory.h" +#include #ifndef DISABLE_THREADING diff --git a/src/gba/renderers/tile-cache.c b/src/gba/renderers/tile-cache.c index e39e727ed..20e24849a 100644 --- a/src/gba/renderers/tile-cache.c +++ b/src/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 -#include "core/tile-cache.h" -#include "gba/video.h" -#include "gba/renderers/tile-cache.h" +#include +#include void GBAVideoTileCacheInit(struct mTileCache* cache) { mTileCacheInit(cache); diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 8b1fdd5d0..3e04be736 100644 --- a/src/gba/renderers/video-software.c +++ b/src/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 +#include +#include -#include "util/arm-algo.h" -#include "util/memory.h" +#include +#include static void GBAVideoSoftwareRendererInit(struct GBAVideoRenderer* renderer); static void GBAVideoSoftwareRendererDeinit(struct GBAVideoRenderer* renderer); diff --git a/src/gba/rr/mgm.c b/src/gba/rr/mgm.c index c578c1b5e..d56e979bb 100644 --- a/src/gba/rr/mgm.c +++ b/src/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 -#include "gba/gba.h" -#include "gba/serialize.h" -#include "util/vfs.h" +#include +#include +#include #define BINARY_EXT ".mgm" #define BINARY_MAGIC "GBAb" diff --git a/src/gba/rr/rr.c b/src/gba/rr/rr.c index f2af0a0d4..da6c48349 100644 --- a/src/gba/rr/rr.c +++ b/src/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 -#include "core/serialize.h" -#include "util/vfs.h" +#include +#include +#include mLOG_DEFINE_CATEGORY(GBA_RR, "GBA RR"); diff --git a/src/gba/rr/vbm.c b/src/gba/rr/vbm.c index c9ebca2e4..2845b74bc 100644 --- a/src/gba/rr/vbm.c +++ b/src/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 -#include "gba/gba.h" -#include "gba/serialize.h" -#include "util/vfs.h" +#include +#include +#include #ifdef USE_ZLIB #include diff --git a/src/gba/savedata.c b/src/gba/savedata.c index 63666161a..f84246f2b 100644 --- a/src/gba/savedata.c +++ b/src/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 -#include "gba/gba.h" -#include "gba/serialize.h" +#include +#include +#include -#include "util/memory.h" -#include "util/vfs.h" +#include +#include #include #include diff --git a/src/gba/serialize.c b/src/gba/serialize.c index efa931212..77f7bc968 100644 --- a/src/gba/serialize.c +++ b/src/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 -#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 +#include +#include -#include "util/memory.h" -#include "util/vfs.h" +#include +#include #include #ifdef _MSC_VER diff --git a/src/gba/sharkport.c b/src/gba/sharkport.c index 5284e57b1..4ada2360c 100644 --- a/src/gba/sharkport.c +++ b/src/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 -#include "gba/gba.h" -#include "util/vfs.h" +#include +#include +#include static const char* const SHARKPORT_HEADER = "SharkPortSave"; diff --git a/src/gba/sio.c b/src/gba/sio.c index 1e191e93c..661d9d09b 100644 --- a/src/gba/sio.c +++ b/src/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 -#include "gba/io.h" +#include +#include mLOG_DEFINE_CATEGORY(GBA_SIO, "GBA Serial I/O"); diff --git a/src/gba/sio/lockstep.c b/src/gba/sio/lockstep.c index 142222a7b..c196fc3fa 100644 --- a/src/gba/sio/lockstep.c +++ b/src/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 -#include "gba/gba.h" -#include "gba/io.h" -#include "gba/video.h" +#include +#include #define LOCKSTEP_INCREMENT 3000 diff --git a/src/gba/test/core.c b/src/gba/test/core.c index 5864f3d05..acb0165af 100644 --- a/src/gba/test/core.c +++ b/src/gba/test/core.c @@ -5,8 +5,8 @@ * 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 +#include M_TEST_DEFINE(create) { struct mCore* core = GBACoreCreate(); diff --git a/src/gba/test/gba.h b/src/gba/test/gba.h index c769e5320..1e50b1d39 100644 --- a/src/gba/test/gba.h +++ b/src/gba/test/gba.h @@ -5,7 +5,7 @@ * 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 int TestRunGBA(void); diff --git a/src/gba/timer.c b/src/gba/timer.c index 3ae17f50c..49722ed4d 100644 --- a/src/gba/timer.c +++ b/src/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 -#include "gba/gba.h" -#include "gba/io.h" +#include +#include static void GBATimerUpdate(struct mTiming* timing, struct GBA* gba, int timerId, uint32_t cyclesLate) { struct GBATimer* timer = &gba->timers[timerId]; diff --git a/src/gba/vfame.c b/src/gba/vfame.c index ae8b44cca..9dc6def16 100644 --- a/src/gba/vfame.c +++ b/src/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 -#include "vfame.h" -#include "gba/gba.h" -#include "gba/memory.h" +#include +#include static const uint8_t ADDRESS_REORDERING[4][16] = { { 15, 14, 9, 1, 8, 10, 7, 3, 5, 11, 4, 0, 13, 12, 2, 6 }, diff --git a/src/gba/video.c b/src/gba/video.c index d05151486..bfd4e5175 100644 --- a/src/gba/video.c +++ b/src/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 -#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 +#include +#include +#include +#include +#include +#include -#include "util/memory.h" +#include mLOG_DEFINE_CATEGORY(GBA_VIDEO, "GBA Video"); diff --git a/src/lr35902/debugger/cli-debugger.c b/src/lr35902/debugger/cli-debugger.c index 349578dbf..65d65b0b7 100644 --- a/src/lr35902/debugger/cli-debugger.c +++ b/src/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 -#include "core/core.h" -#include "debugger/cli-debugger.h" -#include "lr35902/lr35902.h" +#include +#include +#include static void _printStatus(struct CLIDebuggerSystem*); diff --git a/src/lr35902/debugger/debugger.c b/src/lr35902/debugger/debugger.c index 620650aec..a5f08a394 100644 --- a/src/lr35902/debugger/debugger.c +++ b/src/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 -#include "lr35902/lr35902.h" -#include "core/core.h" +#include +#include DEFINE_VECTOR(LR35902DebugBreakpointList, struct LR35902DebugBreakpoint); DEFINE_VECTOR(LR35902DebugWatchpointList, struct LR35902DebugWatchpoint); diff --git a/src/lr35902/isa-lr35902.c b/src/lr35902/isa-lr35902.c index d8f10211f..a625662c8 100644 --- a/src/lr35902/isa-lr35902.c +++ b/src/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 -#include "lr35902/emitter-lr35902.h" -#include "lr35902/lr35902.h" +#include +#include static inline uint16_t LR35902ReadHL(struct LR35902Core* cpu) { uint16_t hl; diff --git a/src/lr35902/lr35902.c b/src/lr35902/lr35902.c index 5b6255b2c..8d1f3f005 100644 --- a/src/lr35902/lr35902.c +++ b/src/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 -#include "isa-lr35902.h" +#include void LR35902Init(struct LR35902Core* cpu) { cpu->master->init(cpu, cpu->master); diff --git a/src/platform/3ds/3ds-memory.c b/src/platform/3ds/3ds-memory.c index e3417c828..c37e4637b 100644 --- a/src/platform/3ds/3ds-memory.c +++ b/src/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 #include <3ds.h> diff --git a/src/platform/3ds/3ds-vfs.c b/src/platform/3ds/3ds-vfs.c index 11e894c95..9de4b1ab3 100644 --- a/src/platform/3ds/3ds-vfs.c +++ b/src/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 #ifdef USE_VFS_3DS -#include "util/memory.h" -#include "util/string.h" +#include +#include struct VFile3DS { struct VFile d; diff --git a/src/platform/3ds/ctru-heap.c b/src/platform/3ds/ctru-heap.c index f1639687c..42608f8b9 100644 --- a/src/platform/3ds/ctru-heap.c +++ b/src/platform/3ds/ctru-heap.c @@ -28,7 +28,7 @@ #include <3ds/services/hid.h> #include <3ds/svc.h> -#include "util/common.h" +#include extern char* fake_heap_start; extern char* fake_heap_end; diff --git a/src/platform/3ds/gui-font.c b/src/platform/3ds/gui-font.c index 2b79e730d..3c1abc0a0 100644 --- a/src/platform/3ds/gui-font.c +++ b/src/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 +#include +#include +#include #include "icons.h" #include "ctr-gpu.h" diff --git a/src/platform/3ds/main.c b/src/platform/3ds/main.c index 3042a67d8..0d17ba9fa 100644 --- a/src/platform/3ds/main.c +++ b/src/platform/3ds/main.c @@ -4,23 +4,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 "core/core.h" +#include +#include #ifdef M_CORE_GBA -#include "gba/gba.h" -#include "gba/input.h" -#include "gba/video.h" +#include +#include +#include #endif #ifdef M_CORE_GB -#include "gb/gb.h" +#include #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 +#include +#include +#include +#include -#include "3ds-vfs.h" +#include #include "ctr-gpu.h" #include <3ds.h> diff --git a/src/platform/3ds/socket.c b/src/platform/3ds/socket.c index d15c6500b..6c380ec49 100644 --- a/src/platform/3ds/socket.c +++ b/src/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 u32* SOCUBuffer = NULL; diff --git a/src/platform/example/client-server/client.c b/src/platform/example/client-server/client.c index c80e54df0..86d8fdc6f 100644 --- a/src/platform/example/client-server/client.c +++ b/src/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 +#include +#include #include diff --git a/src/platform/example/client-server/server.c b/src/platform/example/client-server/server.c index b1e05a81d..75af4edb1 100644 --- a/src/platform/example/client-server/server.c +++ b/src/platform/example/client-server/server.c @@ -1,7 +1,7 @@ // This source file is placed into the public domain. -#include "core/core.h" +#include #include "feature/commandline.h" -#include "util/socket.h" +#include #define DEFAULT_PORT 13721 diff --git a/src/platform/libretro/libretro.c b/src/platform/libretro/libretro.c index b290ee28b..1f7727f5b 100644 --- a/src/platform/libretro/libretro.c +++ b/src/platform/libretro/libretro.c @@ -5,24 +5,24 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "libretro.h" -#include "util/common.h" +#include -#include "core/core.h" -#include "core/version.h" +#include +#include +#include +#include #ifdef M_CORE_GB -#include "gb/core.h" -#include "gb/gb.h" +#include #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 +#include +#include +#include #endif -#include "util/circle-buffer.h" -#include "util/memory.h" -#include "util/vfs.h" +#include +#include +#include #define SAMPLES 1024 #define RUMBLE_PWM 35 @@ -146,7 +146,7 @@ void retro_get_system_av_info(struct retro_system_av_info* info) { 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 @@ void retro_unload_game(void) { } 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; } diff --git a/src/platform/openemu/mGBAGameCore.m b/src/platform/openemu/mGBAGameCore.m index 91ef7b892..1ddf5482f 100644 --- a/src/platform/openemu/mGBAGameCore.m +++ b/src/platform/openemu/mGBAGameCore.m @@ -24,17 +24,18 @@ #import "mGBAGameCore.h" -#include "util/common.h" +#include -#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include #import #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 diff --git a/src/platform/opengl/gl.c b/src/platform/opengl/gl.c index 51bb64365..31bb101aa 100644 --- a/src/platform/opengl/gl.c +++ b/src/platform/opengl/gl.c @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "gl.h" -#include "util/math.h" +#include static const GLint _glVertices[] = { 0, 0, diff --git a/src/platform/opengl/gl.h b/src/platform/opengl/gl.h index b5cda4ce7..a6412e919 100644 --- a/src/platform/opengl/gl.h +++ b/src/platform/opengl/gl.h @@ -6,7 +6,7 @@ #ifndef GL_H #define GL_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/platform/opengl/gles2.c b/src/platform/opengl/gles2.c index 604384055..781217e57 100644 --- a/src/platform/opengl/gles2.c +++ b/src/platform/opengl/gles2.c @@ -5,11 +5,11 @@ * 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 +#include +#include +#include +#include mLOG_DECLARE_CATEGORY(OPENGL); mLOG_DEFINE_CATEGORY(OPENGL, "OpenGL"); diff --git a/src/platform/opengl/gles2.h b/src/platform/opengl/gles2.h index 03cbaf0ae..f6d050bc9 100644 --- a/src/platform/opengl/gles2.h +++ b/src/platform/opengl/gles2.h @@ -6,7 +6,7 @@ #ifndef GLES2_H #define GLES2_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/platform/posix/memory.c b/src/platform/posix/memory.c index 47760275e..7892a5985 100644 --- a/src/platform/posix/memory.c +++ b/src/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 #include diff --git a/src/platform/psp2/gui-font.c b/src/platform/psp2/gui-font.c index 37c94be7b..f0296d541 100644 --- a/src/platform/psp2/gui-font.c +++ b/src/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 +#include +#include #include diff --git a/src/platform/psp2/main.c b/src/platform/psp2/main.c index c184c419d..95dabc13c 100644 --- a/src/platform/psp2/main.c +++ b/src/platform/psp2/main.c @@ -5,12 +5,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "psp2-context.h" -#include "gba/gba.h" +#include #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 +#include +#include +#include #include #include diff --git a/src/platform/psp2/psp2-common.h b/src/platform/psp2/psp2-common.h index 18e70067a..7f34d1d10 100644 --- a/src/platform/psp2/psp2-common.h +++ b/src/platform/psp2/psp2-common.h @@ -6,7 +6,7 @@ #ifndef PSP2_COMMON_H #define PSP2_COMMON_H -#include "util/common.h" +#include #define PSP2_HORIZONTAL_PIXELS 960 #define PSP2_VERTICAL_PIXELS 544 diff --git a/src/platform/psp2/psp2-context.c b/src/platform/psp2/psp2-context.c index 8b75af17c..f58ee6a1d 100644 --- a/src/platform/psp2/psp2-context.c +++ b/src/platform/psp2/psp2-context.c @@ -5,25 +5,25 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "psp2-context.h" -#include "core/core.h" +#include +#include #ifdef M_CORE_GBA -#include "gba/gba.h" +#include #endif #ifdef M_CORE_GB -#include "gb/gb.h" +#include #endif #include "feature/gui/gui-runner.h" -#include "gba/input.h" +#include -#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 +#include +#include +#include +#include +#include #include #include diff --git a/src/platform/psp2/psp2-context.h b/src/platform/psp2/psp2-context.h index 6702c39d7..28a403ba3 100644 --- a/src/platform/psp2/psp2-context.h +++ b/src/platform/psp2/psp2-context.h @@ -7,8 +7,8 @@ #define PSP2_CONTEXT_H #include "psp2-common.h" -#include "core/interface.h" -#include "util/gui.h" +#include +#include struct mGUIRunner; void mPSP2Setup(struct mGUIRunner* runner); diff --git a/src/platform/psp2/psp2-memory.c b/src/platform/psp2/psp2-memory.c index 1118ee901..7ff56318b 100644 --- a/src/platform/psp2/psp2-memory.c +++ b/src/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 +#include #include #include diff --git a/src/platform/psp2/sce-vfs.c b/src/platform/psp2/sce-vfs.c index 4a1e1c559..4b6fdce52 100644 --- a/src/platform/psp2/sce-vfs.c +++ b/src/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 #include -#include "util/vfs.h" -#include "util/memory.h" +#include +#include struct VFileSce { struct VFile d; diff --git a/src/platform/python/_builder.h b/src/platform/python/_builder.h index 8d0cddbb3..58a214d93 100644 --- a/src/platform/python/_builder.h +++ b/src/platform/python/_builder.h @@ -27,23 +27,23 @@ void free(void*); #include "flags.h" -#include "core/core.h" -#include "core/tile-cache.h" +#include +#include #include "platform/python/vfs-py.h" #include "platform/python/log.h" #ifdef USE_PNG -#include "util/png-io.h" +#include #endif #ifdef M_CORE_GBA -#include "arm/arm.h" -#include "gba/gba.h" -#include "gba/input.h" -#include "gba/renderers/tile-cache.h" +#include +#include +#include +#include #endif #ifdef M_CORE_GB -#include "lr35902/lr35902.h" -#include "gb/gb.h" -#include "gba/input.h" -#include "gb/renderers/tile-cache.h" +#include +#include +#include +#include #endif diff --git a/src/platform/python/_builder.py b/src/platform/python/_builder.py index 4bf78ce53..94babdb55 100644 --- a/src/platform/python/_builder.py +++ b/src/platform/python/_builder.py @@ -7,29 +7,30 @@ import sys 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include 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], diff --git a/src/platform/python/log.c b/src/platform/python/log.c index aeb77f69f..6066da4a0 100644 --- a/src/platform/python/log.c +++ b/src/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 struct mLoggerPy { struct mLogger d; @@ -24,4 +24,4 @@ struct mLogger* mLoggerPythonCreate(void* pyobj) { logger->d.log = _pyLogShim; logger->pyobj = pyobj; return &logger->d; -} \ No newline at end of file +} diff --git a/src/platform/python/log.h b/src/platform/python/log.h index 5ee1f7119..f29dba8bb 100644 --- a/src/platform/python/log.h +++ b/src/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 struct mLoggerPy { struct mLogger d; diff --git a/src/platform/python/vfs-py.c b/src/platform/python/vfs-py.c index 51b1f182b..f393832cd 100644 --- a/src/platform/python/vfs-py.c +++ b/src/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 struct VFilePy { struct VFile d; diff --git a/src/platform/python/vfs-py.h b/src/platform/python/vfs-py.h index 82a5ac0cf..2842d4812 100644 --- a/src/platform/python/vfs-py.h +++ b/src/platform/python/vfs-py.h @@ -4,7 +4,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/vfs.h" +#include 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); -} \ No newline at end of file +} diff --git a/src/platform/qt/AboutScreen.cpp b/src/platform/qt/AboutScreen.cpp index 895eaec74..0dce32d2b 100644 --- a/src/platform/qt/AboutScreen.cpp +++ b/src/platform/qt/AboutScreen.cpp @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "AboutScreen.h" -#include "core/version.h" +#include #include #include diff --git a/src/platform/qt/ArchiveInspector.cpp b/src/platform/qt/ArchiveInspector.cpp index 11854ed95..3dfd38d0e 100644 --- a/src/platform/qt/ArchiveInspector.cpp +++ b/src/platform/qt/ArchiveInspector.cpp @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ArchiveInspector.h" -#include "util/vfs.h" +#include using namespace QGBA; diff --git a/src/platform/qt/AssetTile.cpp b/src/platform/qt/AssetTile.cpp index 7066a78bf..74dcdf961 100644 --- a/src/platform/qt/AssetTile.cpp +++ b/src/platform/qt/AssetTile.cpp @@ -9,12 +9,12 @@ #include -#include "core/interface.h" +#include #ifdef M_CORE_GBA -#include "gba/memory.h" +#include #endif #ifdef M_CORE_GB -#include "gb/memory.h" +#include #endif using namespace QGBA; diff --git a/src/platform/qt/AssetTile.h b/src/platform/qt/AssetTile.h index 59800405a..c3bf729f0 100644 --- a/src/platform/qt/AssetTile.h +++ b/src/platform/qt/AssetTile.h @@ -10,7 +10,7 @@ #include "ui_AssetTile.h" -#include "core/tile-cache.h" +#include namespace QGBA { diff --git a/src/platform/qt/AssetView.cpp b/src/platform/qt/AssetView.cpp index 21420ae25..cd95749b8 100644 --- a/src/platform/qt/AssetView.cpp +++ b/src/platform/qt/AssetView.cpp @@ -7,10 +7,6 @@ #include -#ifdef M_CORE_GBA -#include "gba/gba.h" -#endif - using namespace QGBA; AssetView::AssetView(GameController* controller, QWidget* parent) diff --git a/src/platform/qt/AudioDevice.cpp b/src/platform/qt/AudioDevice.cpp index 44d1139af..a74e67f50 100644 --- a/src/platform/qt/AudioDevice.cpp +++ b/src/platform/qt/AudioDevice.cpp @@ -7,9 +7,10 @@ #include "LogController.h" -#include "core/core.h" -#include "core/thread.h" -#include "gba/audio.h" +#include +#include +#include +#include using namespace QGBA; diff --git a/src/platform/qt/AudioProcessorQt.cpp b/src/platform/qt/AudioProcessorQt.cpp index ec9b1bdfb..1ff237b01 100644 --- a/src/platform/qt/AudioProcessorQt.cpp +++ b/src/platform/qt/AudioProcessorQt.cpp @@ -10,8 +10,8 @@ #include -#include "core/core.h" -#include "core/thread.h" +#include +#include using namespace QGBA; diff --git a/src/platform/qt/AudioProcessorSDL.cpp b/src/platform/qt/AudioProcessorSDL.cpp index d869f8836..0e8d50af6 100644 --- a/src/platform/qt/AudioProcessorSDL.cpp +++ b/src/platform/qt/AudioProcessorSDL.cpp @@ -7,7 +7,7 @@ #include "LogController.h" -#include "core/thread.h" +#include using namespace QGBA; diff --git a/src/platform/qt/CheatsModel.cpp b/src/platform/qt/CheatsModel.cpp index d822b305f..79041ecea 100644 --- a/src/platform/qt/CheatsModel.cpp +++ b/src/platform/qt/CheatsModel.cpp @@ -10,7 +10,8 @@ #include -#include "core/cheats.h" +#include +#include using namespace QGBA; diff --git a/src/platform/qt/CheatsView.cpp b/src/platform/qt/CheatsView.cpp index 41799530a..b3e912c55 100644 --- a/src/platform/qt/CheatsView.cpp +++ b/src/platform/qt/CheatsView.cpp @@ -11,12 +11,12 @@ #include #include -#include "core/cheats.h" +#include #ifdef M_CORE_GBA -#include "gba/cheats.h" +#include #endif #ifdef M_CORE_GB -#include "gb/cheats.h" +#include #endif using namespace QGBA; diff --git a/src/platform/qt/ConfigController.h b/src/platform/qt/ConfigController.h index 1953ccfbf..2ce8868fd 100644 --- a/src/platform/qt/ConfigController.h +++ b/src/platform/qt/ConfigController.h @@ -15,8 +15,8 @@ #include -#include "core/config.h" -#include "util/configuration.h" +#include +#include #include "feature/commandline.h" class QAction; diff --git a/src/platform/qt/DebuggerConsoleController.cpp b/src/platform/qt/DebuggerConsoleController.cpp index 0ac49fa0d..0752eb89e 100644 --- a/src/platform/qt/DebuggerConsoleController.cpp +++ b/src/platform/qt/DebuggerConsoleController.cpp @@ -9,7 +9,7 @@ #include -#include "debugger/cli-debugger.h" +#include using namespace QGBA; diff --git a/src/platform/qt/DebuggerConsoleController.h b/src/platform/qt/DebuggerConsoleController.h index bac31e20b..36e7903cb 100644 --- a/src/platform/qt/DebuggerConsoleController.h +++ b/src/platform/qt/DebuggerConsoleController.h @@ -12,7 +12,7 @@ #include #include -#include "debugger/cli-debugger.h" +#include namespace QGBA { diff --git a/src/platform/qt/Display.cpp b/src/platform/qt/Display.cpp index 81526be51..506afe76b 100644 --- a/src/platform/qt/Display.cpp +++ b/src/platform/qt/Display.cpp @@ -9,9 +9,9 @@ #include "DisplayQt.h" #ifdef M_CORE_GB -#include "gb/video.h" +#include #elif defined(M_CORE_GBA) -#include "gba/video.h" +#include #endif using namespace QGBA; diff --git a/src/platform/qt/Display.h b/src/platform/qt/Display.h index 66ce63110..a78810fe8 100644 --- a/src/platform/qt/Display.h +++ b/src/platform/qt/Display.h @@ -6,7 +6,7 @@ #ifndef QGBA_DISPLAY #define QGBA_DISPLAY -#include "util/common.h" +#include #include diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index f59474428..4a1cfff87 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -8,8 +8,8 @@ #include #include -#include "core/core.h" -#include "core/thread.h" +#include +#include #ifdef BUILD_GL #include "platform/opengl/gl.h" #endif diff --git a/src/platform/qt/DisplayQt.cpp b/src/platform/qt/DisplayQt.cpp index 5dec87215..284347d58 100644 --- a/src/platform/qt/DisplayQt.cpp +++ b/src/platform/qt/DisplayQt.cpp @@ -7,8 +7,8 @@ #include -#include "core/core.h" -#include "core/thread.h" +#include +#include using namespace QGBA; diff --git a/src/platform/qt/GBAApp.cpp b/src/platform/qt/GBAApp.cpp index 284145535..ea42ed128 100644 --- a/src/platform/qt/GBAApp.cpp +++ b/src/platform/qt/GBAApp.cpp @@ -16,11 +16,14 @@ #include #include -#include "core/version.h" +#include +#include +#include +#include +#include +/* #include "feature/commandline.h" -#include "util/nointro.h" -#include "util/socket.h" - +*/ using namespace QGBA; static GBAApp* g_app = nullptr; diff --git a/src/platform/qt/GBAApp.h b/src/platform/qt/GBAApp.h index 988b55f11..a0e13a60e 100644 --- a/src/platform/qt/GBAApp.h +++ b/src/platform/qt/GBAApp.h @@ -14,8 +14,7 @@ struct NoIntroDB; -#include "core/log.h" -#include "gba/sio.h" +#include mLOG_DECLARE_CATEGORY(QT); diff --git a/src/platform/qt/GBAKeyEditor.h b/src/platform/qt/GBAKeyEditor.h index a2b1391fc..7274a6078 100644 --- a/src/platform/qt/GBAKeyEditor.h +++ b/src/platform/qt/GBAKeyEditor.h @@ -11,7 +11,7 @@ #include #include -#include "gba/input.h" +#include class QComboBox; class QTimer; diff --git a/src/platform/qt/GBAOverride.cpp b/src/platform/qt/GBAOverride.cpp index bd165454a..61a01b6d7 100644 --- a/src/platform/qt/GBAOverride.cpp +++ b/src/platform/qt/GBAOverride.cpp @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "GBAOverride.h" -#include "core/core.h" +#include using namespace QGBA; diff --git a/src/platform/qt/GBAOverride.h b/src/platform/qt/GBAOverride.h index 8f2042684..a668a0d57 100644 --- a/src/platform/qt/GBAOverride.h +++ b/src/platform/qt/GBAOverride.h @@ -8,7 +8,7 @@ #include "Override.h" -#include "gba/overrides.h" +#include namespace QGBA { diff --git a/src/platform/qt/GBOverride.cpp b/src/platform/qt/GBOverride.cpp index 6aa4fd205..e0ff2b4d8 100644 --- a/src/platform/qt/GBOverride.cpp +++ b/src/platform/qt/GBOverride.cpp @@ -5,9 +5,9 @@ * 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 +#include +#include using namespace QGBA; diff --git a/src/platform/qt/GBOverride.h b/src/platform/qt/GBOverride.h index 6d35618fc..7c52b497a 100644 --- a/src/platform/qt/GBOverride.h +++ b/src/platform/qt/GBOverride.h @@ -8,7 +8,7 @@ #include "Override.h" -#include "gb/overrides.h" +#include namespace QGBA { diff --git a/src/platform/qt/GDBController.h b/src/platform/qt/GDBController.h index aac3852b8..206c8a27e 100644 --- a/src/platform/qt/GDBController.h +++ b/src/platform/qt/GDBController.h @@ -10,7 +10,7 @@ #ifdef USE_GDB_STUB -#include "debugger/gdb-stub.h" +#include namespace QGBA { diff --git a/src/platform/qt/GIFView.cpp b/src/platform/qt/GIFView.cpp index 427bb9459..e72475150 100644 --- a/src/platform/qt/GIFView.cpp +++ b/src/platform/qt/GIFView.cpp @@ -12,6 +12,9 @@ #include +#include +#include + using namespace QGBA; GIFView::GIFView(QWidget* parent) diff --git a/src/platform/qt/GameController.cpp b/src/platform/qt/GameController.cpp index d31ffa1a3..a86fbf8ac 100644 --- a/src/platform/qt/GameController.cpp +++ b/src/platform/qt/GameController.cpp @@ -17,22 +17,23 @@ #include -#include "core/config.h" -#include "core/directories.h" -#include "core/serialize.h" -#include "core/tile-cache.h" +#include +#include +#include +#include #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 +#include +#include +#include +#include +#include #endif #ifdef M_CORE_GB -#include "gb/gb.h" -#include "gb/renderers/tile-cache.h" +#include +#include #endif -#include "util/vfs.h" +#include using namespace QGBA; using namespace std; diff --git a/src/platform/qt/GameController.h b/src/platform/qt/GameController.h index 30369c538..63383ac23 100644 --- a/src/platform/qt/GameController.h +++ b/src/platform/qt/GameController.h @@ -15,12 +15,10 @@ #include -#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 +#include +#include +#include #ifdef BUILD_SDL #include "platform/sdl/sdl-events.h" #endif diff --git a/src/platform/qt/GamepadAxisEvent.h b/src/platform/qt/GamepadAxisEvent.h index 6416041bd..68234ccdc 100644 --- a/src/platform/qt/GamepadAxisEvent.h +++ b/src/platform/qt/GamepadAxisEvent.h @@ -8,7 +8,7 @@ #include -#include "gba/input.h" +#include namespace QGBA { diff --git a/src/platform/qt/GamepadButtonEvent.h b/src/platform/qt/GamepadButtonEvent.h index 82419191e..b0751f4b6 100644 --- a/src/platform/qt/GamepadButtonEvent.h +++ b/src/platform/qt/GamepadButtonEvent.h @@ -8,7 +8,7 @@ #include -#include "gba/input.h" +#include namespace QGBA { diff --git a/src/platform/qt/IOViewer.cpp b/src/platform/qt/IOViewer.cpp index b7b9bdd50..b308de6a4 100644 --- a/src/platform/qt/IOViewer.cpp +++ b/src/platform/qt/IOViewer.cpp @@ -12,11 +12,13 @@ #include #include -#include "gba/io.h" +#include +#include + +struct ARMCore; using namespace QGBA; - QList IOViewer::s_registers; const QList& IOViewer::registerDescriptions() { diff --git a/src/platform/qt/InputController.cpp b/src/platform/qt/InputController.cpp index c8a86f1cb..eca5dfe97 100644 --- a/src/platform/qt/InputController.cpp +++ b/src/platform/qt/InputController.cpp @@ -14,8 +14,8 @@ #include #include -#include "core/interface.h" -#include "util/configuration.h" +#include +#include using namespace QGBA; diff --git a/src/platform/qt/InputController.h b/src/platform/qt/InputController.h index ce33b8b28..8dc5af196 100644 --- a/src/platform/qt/InputController.h +++ b/src/platform/qt/InputController.h @@ -14,7 +14,7 @@ class QTimer; -#include "gba/input.h" +#include #ifdef BUILD_SDL #include "platform/sdl/sdl-events.h" diff --git a/src/platform/qt/InputProfile.h b/src/platform/qt/InputProfile.h index d0d80e155..431bd4b4f 100644 --- a/src/platform/qt/InputProfile.h +++ b/src/platform/qt/InputProfile.h @@ -8,7 +8,7 @@ #include "GamepadAxisEvent.h" -#include "gba/interface.h" +#include namespace QGBA { diff --git a/src/platform/qt/LibraryModel.cpp b/src/platform/qt/LibraryModel.cpp index da085cf0a..9973af042 100644 --- a/src/platform/qt/LibraryModel.cpp +++ b/src/platform/qt/LibraryModel.cpp @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "LibraryModel.h" -#include "util/vfs.h" +#include using namespace QGBA; diff --git a/src/platform/qt/LibraryModel.h b/src/platform/qt/LibraryModel.h index d11cdaaf7..5f8999461 100644 --- a/src/platform/qt/LibraryModel.h +++ b/src/platform/qt/LibraryModel.h @@ -8,7 +8,7 @@ #include -#include "core/library.h" +#include struct VDir; diff --git a/src/platform/qt/LoadSaveState.cpp b/src/platform/qt/LoadSaveState.cpp index 64210ce75..122cb133e 100644 --- a/src/platform/qt/LoadSaveState.cpp +++ b/src/platform/qt/LoadSaveState.cpp @@ -14,11 +14,9 @@ #include #include -#include "core/serialize.h" -#ifdef M_CORE_GBA -#include "gba/serialize.h" -#endif -#include "util/memory.h" +#include +#include +#include using namespace QGBA; diff --git a/src/platform/qt/LogController.h b/src/platform/qt/LogController.h index b630f33e6..0a4be0159 100644 --- a/src/platform/qt/LogController.h +++ b/src/platform/qt/LogController.h @@ -11,8 +11,6 @@ #include #include -#include "gba/gba.h" - namespace QGBA { class LogController : public QObject { diff --git a/src/platform/qt/MemoryModel.cpp b/src/platform/qt/MemoryModel.cpp index 888e020d0..e7f4d126e 100644 --- a/src/platform/qt/MemoryModel.cpp +++ b/src/platform/qt/MemoryModel.cpp @@ -19,7 +19,8 @@ #include #include -#include "core/core.h" +#include +#include using namespace QGBA; diff --git a/src/platform/qt/MemoryModel.h b/src/platform/qt/MemoryModel.h index 1e0fbd645..a32bb8c36 100644 --- a/src/platform/qt/MemoryModel.h +++ b/src/platform/qt/MemoryModel.h @@ -13,7 +13,7 @@ #include #include -#include "util/text-codec.h" +#include struct mCore; diff --git a/src/platform/qt/MemoryView.cpp b/src/platform/qt/MemoryView.cpp index 9fdfb0704..20a6dce16 100644 --- a/src/platform/qt/MemoryView.cpp +++ b/src/platform/qt/MemoryView.cpp @@ -8,12 +8,12 @@ #include "GameController.h" -#include "core/core.h" +#include #ifdef M_CORE_GBA -#include "gba/memory.h" +#include #endif #ifdef M_CORE_GB -#include "gb/memory.h" +#include #endif using namespace QGBA; diff --git a/src/platform/qt/MessagePainter.cpp b/src/platform/qt/MessagePainter.cpp index 6cb9b7835..629ce4878 100644 --- a/src/platform/qt/MessagePainter.cpp +++ b/src/platform/qt/MessagePainter.cpp @@ -9,7 +9,7 @@ #include -#include "gba/video.h" +#include using namespace QGBA; diff --git a/src/platform/qt/MultiplayerController.cpp b/src/platform/qt/MultiplayerController.cpp index 850dd350e..dc5e54ebb 100644 --- a/src/platform/qt/MultiplayerController.cpp +++ b/src/platform/qt/MultiplayerController.cpp @@ -8,10 +8,10 @@ #include "GameController.h" #ifdef M_CORE_GBA -#include "gba/gba.h" +#include #endif #ifdef M_CORE_GB -#include "gb/gb.h" +#include #endif using namespace QGBA; diff --git a/src/platform/qt/MultiplayerController.h b/src/platform/qt/MultiplayerController.h index ca88757fe..42de75bcb 100644 --- a/src/platform/qt/MultiplayerController.h +++ b/src/platform/qt/MultiplayerController.h @@ -10,12 +10,12 @@ #include #include -#include "core/lockstep.h" +#include #ifdef M_CORE_GBA -#include "gba/sio/lockstep.h" +#include #endif #ifdef M_CORE_GB -#include "gb/sio/lockstep.h" +#include #endif namespace QGBA { diff --git a/src/platform/qt/ObjView.cpp b/src/platform/qt/ObjView.cpp index da6910c43..f2471226b 100644 --- a/src/platform/qt/ObjView.cpp +++ b/src/platform/qt/ObjView.cpp @@ -10,10 +10,10 @@ #include #include -#include "gba/gba.h" +#include #ifdef M_CORE_GB -#include "gb/gb.h" -#include "gb/io.h" +#include +#include #endif using namespace QGBA; diff --git a/src/platform/qt/ObjView.h b/src/platform/qt/ObjView.h index afa5f1c2a..725fabfd4 100644 --- a/src/platform/qt/ObjView.h +++ b/src/platform/qt/ObjView.h @@ -11,7 +11,7 @@ #include "ui_ObjView.h" -#include "core/tile-cache.h" +#include namespace QGBA { diff --git a/src/platform/qt/OverrideView.cpp b/src/platform/qt/OverrideView.cpp index d5875ebd0..ad0819616 100644 --- a/src/platform/qt/OverrideView.cpp +++ b/src/platform/qt/OverrideView.cpp @@ -12,12 +12,12 @@ #ifdef M_CORE_GBA #include "GBAOverride.h" -#include "gba/gba.h" +#include #endif #ifdef M_CORE_GB #include "GBOverride.h" -#include "gb/gb.h" +#include #endif using namespace QGBA; diff --git a/src/platform/qt/OverrideView.h b/src/platform/qt/OverrideView.h index aad6709ab..c7f3fad99 100644 --- a/src/platform/qt/OverrideView.h +++ b/src/platform/qt/OverrideView.h @@ -9,7 +9,7 @@ #include #ifdef M_CORE_GB -#include "gb/overrides.h" +#include #endif #include "ui_OverrideView.h" diff --git a/src/platform/qt/PaletteView.cpp b/src/platform/qt/PaletteView.cpp index 8f756bec1..af55bdd4b 100644 --- a/src/platform/qt/PaletteView.cpp +++ b/src/platform/qt/PaletteView.cpp @@ -12,15 +12,15 @@ #include #include -#include "core/core.h" -#include "util/export.h" -#ifdef M_CORE_GA -#include "gba/gba.h" +#include +#ifdef M_CORE_GBA +#include #endif #ifdef M_CORE_GB -#include "gb/gb.h" +#include #endif -#include "util/vfs.h" +#include +#include using namespace QGBA; diff --git a/src/platform/qt/ROMInfo.cpp b/src/platform/qt/ROMInfo.cpp index bdea67c43..d83b4cf2c 100644 --- a/src/platform/qt/ROMInfo.cpp +++ b/src/platform/qt/ROMInfo.cpp @@ -8,14 +8,14 @@ #include "GBAApp.h" #include "GameController.h" -#include "core/core.h" +#include #ifdef M_CORE_GB -#include "gb/gb.h" +#include #endif #ifdef M_CORE_GBA -#include "gba/gba.h" +#include #endif -#include "util/nointro.h" +#include using namespace QGBA; diff --git a/src/platform/qt/SensorView.cpp b/src/platform/qt/SensorView.cpp index 6305d801c..b0e86cc64 100644 --- a/src/platform/qt/SensorView.cpp +++ b/src/platform/qt/SensorView.cpp @@ -9,8 +9,8 @@ #include "GamepadAxisEvent.h" #include "InputController.h" -#include "core/core.h" -#include "gba/gba.h" +#include +#include using namespace QGBA; diff --git a/src/platform/qt/SettingsView.cpp b/src/platform/qt/SettingsView.cpp index ef11f79ba..d4625e13e 100644 --- a/src/platform/qt/SettingsView.cpp +++ b/src/platform/qt/SettingsView.cpp @@ -13,8 +13,8 @@ #include "InputController.h" #include "ShortcutView.h" -#include "core/serialize.h" -#include "gba/gba.h" +#include +#include using namespace QGBA; diff --git a/src/platform/qt/ShaderSelector.cpp b/src/platform/qt/ShaderSelector.cpp index b5f8feccd..928cef505 100644 --- a/src/platform/qt/ShaderSelector.cpp +++ b/src/platform/qt/ShaderSelector.cpp @@ -17,7 +17,8 @@ #include #include -#include "core/version.h" +#include +#include #include "platform/video-backend.h" #if !defined(_WIN32) || defined(USE_EPOXY) diff --git a/src/platform/qt/Swatch.cpp b/src/platform/qt/Swatch.cpp index 5ff1fc2b6..8c0e64212 100644 --- a/src/platform/qt/Swatch.cpp +++ b/src/platform/qt/Swatch.cpp @@ -8,7 +8,7 @@ #include #include -#include "core/interface.h" +#include using namespace QGBA; diff --git a/src/platform/qt/TileView.cpp b/src/platform/qt/TileView.cpp index c8b383741..eb4dbd18d 100644 --- a/src/platform/qt/TileView.cpp +++ b/src/platform/qt/TileView.cpp @@ -11,7 +11,7 @@ #include #ifdef M_CORE_GB -#include "gb/gb.h" +#include #endif using namespace QGBA; diff --git a/src/platform/qt/TileView.h b/src/platform/qt/TileView.h index aef5b526f..623d83a47 100644 --- a/src/platform/qt/TileView.h +++ b/src/platform/qt/TileView.h @@ -11,7 +11,7 @@ #include "ui_TileView.h" -#include "core/tile-cache.h" +#include namespace QGBA { diff --git a/src/platform/qt/VFileDevice.cpp b/src/platform/qt/VFileDevice.cpp index 3e15c9f62..04da09353 100644 --- a/src/platform/qt/VFileDevice.cpp +++ b/src/platform/qt/VFileDevice.cpp @@ -5,6 +5,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "VFileDevice.h" +#include + using namespace QGBA; VFileDevice::VFileDevice(VFile* vf, QObject* parent) diff --git a/src/platform/qt/VFileDevice.h b/src/platform/qt/VFileDevice.h index 2cdd85d14..71baecd1a 100644 --- a/src/platform/qt/VFileDevice.h +++ b/src/platform/qt/VFileDevice.h @@ -8,7 +8,8 @@ #include -#include "util/vfs.h" +struct VDir; +struct VFile; namespace QGBA { diff --git a/src/platform/qt/VideoView.cpp b/src/platform/qt/VideoView.cpp index 0e8433af0..6a6523b6e 100644 --- a/src/platform/qt/VideoView.cpp +++ b/src/platform/qt/VideoView.cpp @@ -12,10 +12,6 @@ #include -#ifdef M_CORE_GB -#include "gb/video.h" -#endif - using namespace QGBA; QMap VideoView::s_acodecMap; diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index ca3ca0fae..9a2d594a6 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -42,13 +42,14 @@ #include "TileView.h" #include "VideoView.h" -#include "core/version.h" +#include #ifdef M_CORE_GB -#include "gb/gb.h" +#include +#include #endif #include "feature/commandline.h" -#include "util/nointro.h" -#include "util/vfs.h" +#include +#include using namespace QGBA; diff --git a/src/platform/qt/Window.h b/src/platform/qt/Window.h index 557b99a80..087977fb3 100644 --- a/src/platform/qt/Window.h +++ b/src/platform/qt/Window.h @@ -13,8 +13,7 @@ #include -#include "core/thread.h" -#include "gba/gba.h" +#include #include "InputController.h" #include "LoadSaveState.h" diff --git a/src/platform/sdl/gl-common.c b/src/platform/sdl/gl-common.c index 3e4f7add2..7ed9aa95b 100644 --- a/src/platform/sdl/gl-common.c +++ b/src/platform/sdl/gl-common.c @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "main.h" -#include "core/version.h" +#include void mSDLGLCommonSwap(struct VideoBackend* context) { struct mSDLRenderer* renderer = (struct mSDLRenderer*) context->user; diff --git a/src/platform/sdl/gl-common.h b/src/platform/sdl/gl-common.h index 4a22c1b34..b517dd436 100644 --- a/src/platform/sdl/gl-common.h +++ b/src/platform/sdl/gl-common.h @@ -6,7 +6,7 @@ #ifndef SDL_GL_COMMON_H #define SDL_GL_COMMON_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/platform/sdl/gl-sdl.c b/src/platform/sdl/gl-sdl.c index 0a34b7600..0ecf67ecd 100644 --- a/src/platform/sdl/gl-sdl.c +++ b/src/platform/sdl/gl-sdl.c @@ -7,8 +7,8 @@ #include "gl-common.h" -#include "core/core.h" -#include "core/thread.h" +#include +#include #include "platform/opengl/gl.h" static void _doViewport(int w, int h, struct VideoBackend* v) { diff --git a/src/platform/sdl/main.c b/src/platform/sdl/main.c index c6621ecf5..9bbabedbc 100644 --- a/src/platform/sdl/main.c +++ b/src/platform/sdl/main.c @@ -5,33 +5,23 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "main.h" -#include "debugger/cli-debugger.h" +#include #ifdef USE_GDB_STUB -#include "debugger/gdb-stub.h" +#include #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 +#include +#include +#include +#include + #include "feature/commandline.h" -#include "util/configuration.h" -#include "util/vfs.h" +#include #include diff --git a/src/platform/sdl/main.h b/src/platform/sdl/main.h index d8f34909b..0477692cb 100644 --- a/src/platform/sdl/main.h +++ b/src/platform/sdl/main.h @@ -6,18 +6,10 @@ #ifndef SDL_MAIN_H #define SDL_MAIN_H -#include "util/common.h" +#include 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" diff --git a/src/platform/sdl/sdl-audio.c b/src/platform/sdl/sdl-audio.c index c731cfba7..369592140 100644 --- a/src/platform/sdl/sdl-audio.c +++ b/src/platform/sdl/sdl-audio.c @@ -5,11 +5,12 @@ * 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 +#include +#include +#include -#include "third-party/blip_buf/blip_buf.h" +#include #define BUFFER_SIZE (GBA_AUDIO_SAMPLES >> 2) diff --git a/src/platform/sdl/sdl-audio.h b/src/platform/sdl/sdl-audio.h index f7001cb61..dc21cb86c 100644 --- a/src/platform/sdl/sdl-audio.h +++ b/src/platform/sdl/sdl-audio.h @@ -6,11 +6,11 @@ #ifndef SDL_AUDIO_H #define SDL_AUDIO_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/log.h" +#include #include diff --git a/src/platform/sdl/sdl-events.c b/src/platform/sdl/sdl-events.c index 3da4c2a78..474265ce4 100644 --- a/src/platform/sdl/sdl-events.c +++ b/src/platform/sdl/sdl-events.c @@ -5,18 +5,15 @@ * 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 +#include +#include +#include +#include +#include +#include +#include +#include #if SDL_VERSION_ATLEAST(2, 0, 0) && defined(__APPLE__) #define GUI_MOD KMOD_GUI diff --git a/src/platform/sdl/sdl-events.h b/src/platform/sdl/sdl-events.h index eea7bb7ba..bebf02cea 100644 --- a/src/platform/sdl/sdl-events.h +++ b/src/platform/sdl/sdl-events.h @@ -6,14 +6,14 @@ #ifndef SDL_EVENTS_H #define SDL_EVENTS_H -#include "util/common.h" +#include CXX_GUARD_START -#include "core/interface.h" -#include "core/log.h" -#include "util/circle-buffer.h" -#include "util/vector.h" +#include +#include +#include +#include #include diff --git a/src/platform/test/fuzz-main.c b/src/platform/test/fuzz-main.c index b8009f82e..d40a15937 100644 --- a/src/platform/test/fuzz-main.c +++ b/src/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 +#include +#include +#include +#include +#include +#include +#include #include "feature/commandline.h" -#include "util/memory.h" -#include "util/string.h" -#include "util/vfs.h" +#include +#include +#include #include #include diff --git a/src/platform/test/perf-main.c b/src/platform/test/perf-main.c index 390c49402..03fe093ce 100644 --- a/src/platform/test/perf-main.c +++ b/src/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 +#include +#include +#include +#include +#include +#include #include "feature/commandline.h" -#include "util/socket.h" -#include "util/string.h" -#include "util/vfs.h" +#include +#include +#include #ifdef _3DS #include <3ds.h> diff --git a/src/platform/test/tbl-fuzz-main.c b/src/platform/test/tbl-fuzz-main.c index bd7e2ff00..d1c39fbd2 100644 --- a/src/platform/test/tbl-fuzz-main.c +++ b/src/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 +#include int main(int argc, char** argv) { struct TextCodec codec; diff --git a/src/platform/video-backend.h b/src/platform/video-backend.h index 31d7a5301..79264c4e2 100644 --- a/src/platform/video-backend.h +++ b/src/platform/video-backend.h @@ -6,7 +6,7 @@ #ifndef VIDEO_BACKEND_H #define VIDEO_BACKEND_H -#include "util/common.h" +#include CXX_GUARD_START diff --git a/src/platform/wii/gui-font.c b/src/platform/wii/gui-font.c index 101ca383b..1a247c751 100644 --- a/src/platform/wii/gui-font.c +++ b/src/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 +#include #include "icons.h" #include "font.h" diff --git a/src/platform/wii/main.c b/src/platform/wii/main.c index bcc9c8251..29096042e 100644 --- a/src/platform/wii/main.c +++ b/src/platform/wii/main.c @@ -12,18 +12,19 @@ #include #include -#include "util/common.h" +#include -#include "core/core.h" +#include +#include #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 +#include +#include +#include +#include +#include +#include +#include #define GCN1_INPUT 0x47434E31 #define GCN2_INPUT 0x47434E32 diff --git a/src/platform/wii/wii-memory.c b/src/platform/wii/wii-memory.c index e034bf760..419b58f9a 100644 --- a/src/platform/wii/wii-memory.c +++ b/src/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 void* anonymousMemoryMap(size_t size) { return malloc(size); diff --git a/src/platform/windows/vfs-w32.c b/src/platform/windows/vfs-w32.c index 565feee07..315429fae 100644 --- a/src/platform/windows/vfs-w32.c +++ b/src/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 -#include "util/string.h" +#include #include static bool _vdwClose(struct VDir* vd); diff --git a/src/third-party/blip_buf/blip_buf.c b/src/third-party/blip_buf/blip_buf.c index 362eede49..6bc7da8bd 100644 --- a/src/third-party/blip_buf/blip_buf.c +++ b/src/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 #include #include diff --git a/src/util/circle-buffer.c b/src/util/circle-buffer.c index 5220ced44..deb426473 100644 --- a/src/util/circle-buffer.c +++ b/src/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 #ifndef NDEBUG static int _checkIntegrity(struct CircleBuffer* buffer) { diff --git a/src/util/configuration.c b/src/util/configuration.c index adae7f300..1021c5137 100644 --- a/src/util/configuration.c +++ b/src/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 -#include "util/formatting.h" -#include "util/string.h" -#include "util/vfs.h" +#include +#include +#include #include "third-party/inih/ini.h" diff --git a/src/util/crc32.c b/src/util/crc32.c index 77c1715f1..21a4354d4 100644 --- a/src/util/crc32.c +++ b/src/util/crc32.c @@ -40,9 +40,9 @@ * CRC32 code derived from work by Gary S. Brown. */ -#include "util/crc32.h" +#include -#include "util/vfs.h" +#include enum { BUFFER_SIZE = 1024 diff --git a/src/util/export.c b/src/util/export.c index 3e7145f7e..cb138ce5a 100644 --- a/src/util/export.c +++ b/src/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 -#include "gba/video.h" -#include "util/vfs.h" +#include +#include bool exportPaletteRIFF(struct VFile* vf, size_t entries, const uint16_t* colors) { if (entries > 0xFFFF) { diff --git a/src/util/formatting.c b/src/util/formatting.c index e0f200ed6..ccd874622 100644 --- a/src/util/formatting.c +++ b/src/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 #include #include diff --git a/src/util/gui.c b/src/util/gui.c index 5aed3d58b..ec37f99e5 100644 --- a/src/util/gui.c +++ b/src/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 void GUIInit(struct GUIParams* params) { memset(params->inputHistory, 0, sizeof(params->inputHistory)); diff --git a/src/util/gui/file-select.c b/src/util/gui/file-select.c index 70bc91120..96bb632f2 100644 --- a/src/util/gui/file-select.c +++ b/src/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 -#include "util/gui/font.h" -#include "util/gui/menu.h" -#include "util/vfs.h" +#include +#include +#include #include diff --git a/src/util/gui/font-metrics.c b/src/util/gui/font-metrics.c index 3513fec70..0e965a3e6 100644 --- a/src/util/gui/font-metrics.c +++ b/src/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 const struct GUIFontGlyphMetric defaultFontMetrics[128] = { { 0, 0, { 0, 0, 0, 0 }}, // 0x00 diff --git a/src/util/gui/font.c b/src/util/gui/font.c index 03965bf24..05ceffa92 100644 --- a/src/util/gui/font.c +++ b/src/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 -#include "util/string.h" +#include unsigned GUIFontSpanWidth(const struct GUIFont* font, const char* text) { unsigned width = 0; diff --git a/src/util/gui/menu.c b/src/util/gui/menu.c index dcfdfdab7..6f8eb8327 100644 --- a/src/util/gui/menu.c +++ b/src/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 -#include "util/gui.h" -#include "util/gui/font.h" +#include +#include #ifdef _3DS #include <3ds.h> diff --git a/src/util/hash.c b/src/util/hash.c index 96e2ffb7f..9db508c13 100644 --- a/src/util/hash.c +++ b/src/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 #if defined(_MSC_VER) diff --git a/src/util/nointro.c b/src/util/nointro.c index fdf3008b3..bb5471572 100644 --- a/src/util/nointro.c +++ b/src/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 -#include "util/crc32.h" -#include "util/table.h" -#include "util/vector.h" -#include "util/vfs.h" +#include +#include +#include #define KEY_STACK_SIZE 8 diff --git a/src/util/patch-fast.c b/src/util/patch-fast.c index d2722792f..81b3aa45a 100644 --- a/src/util/patch-fast.c +++ b/src/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 DEFINE_VECTOR(PatchFastExtents, struct PatchFastExtent); diff --git a/src/util/patch-ips.c b/src/util/patch-ips.c index 0249f9ce9..34b41658d 100644 --- a/src/util/patch-ips.c +++ b/src/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 -#include "util/patch.h" -#include "util/vfs.h" +#include +#include 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); diff --git a/src/util/patch-ups.c b/src/util/patch-ups.c index 80573387a..d58ee2216 100644 --- a/src/util/patch-ups.c +++ b/src/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 -#include "util/crc32.h" -#include "util/patch.h" -#include "util/vfs.h" +#include +#include +#include enum { IN_CHECKSUM = -12, diff --git a/src/util/patch.c b/src/util/patch.c index d4e950e6c..b83c0d853 100644 --- a/src/util/patch.c +++ b/src/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 -#include "util/patch-ips.h" -#include "util/patch-ups.h" +#include +#include bool loadPatch(struct VFile* vf, struct Patch* patch) { patch->vf = vf; diff --git a/src/util/png-io.c b/src/util/png-io.c index 09631dbe4..e3e17ff5e 100644 --- a/src/util/png-io.c +++ b/src/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 #ifdef USE_PNG -#include "vfs.h" +#include static void _pngWrite(png_structp png, png_bytep buffer, png_size_t size) { struct VFile* vf = png_get_io_ptr(png); diff --git a/src/util/ring-fifo.c b/src/util/ring-fifo.c index 5cac3f2c4..167690c61 100644 --- a/src/util/ring-fifo.c +++ b/src/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 -#include "util/memory.h" +#include void RingFIFOInit(struct RingFIFO* buffer, size_t capacity) { buffer->data = anonymousMemoryMap(capacity); diff --git a/src/util/string.c b/src/util/string.c index eb05768db..7e18a8547 100644 --- a/src/util/string.c +++ b/src/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 #include diff --git a/src/util/table.c b/src/util/table.c index 3f4deb013..179d40a00 100644 --- a/src/util/table.c +++ b/src/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 -#include "util/hash.h" -#include "util/string.h" +#include +#include #define LIST_INITIAL_SIZE 8 #define TABLE_INITIAL_SIZE 8 diff --git a/src/util/test/suite.h b/src/util/test/suite.h index f446e2cf6..dd947830d 100644 --- a/src/util/test/suite.h +++ b/src/util/test/suite.h @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef SUITE_H #define SUITE_H -#include "util/common.h" +#include #include #include diff --git a/src/util/test/text-codec.c b/src/util/test/text-codec.c index 75e382f8c..54c05703f 100644 --- a/src/util/test/text-codec.c +++ b/src/util/test/text-codec.c @@ -5,8 +5,8 @@ * 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 +#include M_TEST_DEFINE(emptyCodec) { struct VFile* vf = VFileMemChunk(NULL, 0); diff --git a/src/util/test/util.h b/src/util/test/util.h index e5a374554..0a665b995 100644 --- a/src/util/test/util.h +++ b/src/util/test/util.h @@ -5,7 +5,7 @@ * 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 int TestRunUtil(void); diff --git a/src/util/test/vfs.c b/src/util/test/vfs.c index b011d5039..cc623d1b0 100644 --- a/src/util/test/vfs.c +++ b/src/util/test/vfs.c @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "util/test/suite.h" -#include "util/vfs.h" +#include #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 M_TEST_DEFINE(openNullPathR) { diff --git a/src/util/text-codec.c b/src/util/text-codec.c index 399016f59..173f2b36c 100644 --- a/src/util/text-codec.c +++ b/src/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 -#include "util/string.h" -#include "util/table.h" -#include "util/vfs.h" +#include +#include +#include struct TextCodecNode { uint8_t* leaf; diff --git a/src/util/vfs.c b/src/util/vfs.c index 27932c717..82035ec1e 100644 --- a/src/util/vfs.c +++ b/src/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 -#include "util/string.h" +#include #ifdef PSP2 -#include "platform/psp2/sce-vfs.h" +#include #endif #ifdef _3DS -#include "platform/3ds/3ds-vfs.h" +#include #endif struct VFile* VFileOpen(const char* path, int flags) { diff --git a/src/util/vfs/vfs-devlist.c b/src/util/vfs/vfs-devlist.c index 8f25feb17..667ffd193 100644 --- a/src/util/vfs/vfs-devlist.c +++ b/src/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 #include diff --git a/src/util/vfs/vfs-dirent.c b/src/util/vfs/vfs-dirent.c index 7104af808..d124af355 100644 --- a/src/util/vfs/vfs-dirent.c +++ b/src/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 -#include "util/string.h" +#include #include #include diff --git a/src/util/vfs/vfs-fd.c b/src/util/vfs/vfs-fd.c index 2b0f418c9..39b2164ee 100644 --- a/src/util/vfs/vfs-fd.c +++ b/src/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 #include #include diff --git a/src/util/vfs/vfs-file.c b/src/util/vfs/vfs-file.c index 57ab37efa..bfde30e93 100644 --- a/src/util/vfs/vfs-file.c +++ b/src/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 -#include "util/memory.h" +#include #include #include diff --git a/src/util/vfs/vfs-lzma.c b/src/util/vfs/vfs-lzma.c index 359628abd..53bf5e619 100644 --- a/src/util/vfs/vfs-lzma.c +++ b/src/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 #ifdef USE_LZMA -#include "util/string.h" +#include #include "third-party/lzma/7z.h" #include "third-party/lzma/7zAlloc.h" diff --git a/src/util/vfs/vfs-mem.c b/src/util/vfs/vfs-mem.c index 2d8798012..7264577cf 100644 --- a/src/util/vfs/vfs-mem.c +++ b/src/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 +#include struct VFileMem { struct VFile d; diff --git a/src/util/vfs/vfs-zip.c b/src/util/vfs/vfs-zip.c index a0773ae8a..13220a303 100644 --- a/src/util/vfs/vfs-zip.c +++ b/src/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 -#include "util/string.h" +#include #ifdef USE_LIBZIP #include @@ -41,7 +41,7 @@ enum { #else #include "third-party/zlib/contrib/minizip/unzip.h" #endif -#include "util/memory.h" +#include struct VDirEntryZip { struct VDirEntry d;