From 43db8cc0f529a2b8004a684526d91582d0d6d5d7 Mon Sep 17 00:00:00 2001 From: Snesrev Date: Thu, 17 Aug 2023 02:56:21 +0200 Subject: [PATCH] Move around files --- .gitignore | 16 +- Makefile | 14 +- README.md | 20 +- {tables => assets}/.gitignore | 0 {tables => assets}/compile_music.py | 0 {tables => assets}/compile_resources.py | 2 +- {tables => assets}/decode_music.py | 0 {tables => assets}/extract_music.py | 0 {tables => assets}/extract_resources.py | 0 {tables => assets}/palette_usage.bin | Bin {tables => assets}/restool.py | 4 + {tables => assets}/sprite_sheet_info.py | 0 {tables => assets}/sprite_sheets.py | 0 {tables => assets}/sprites/.gitignore | 0 {tables => assets}/tables.py | 0 {tables => assets}/text_compression.py | 0 {tables => assets}/util.py | 2 +- extract_assets.bat | 25 + run_with_tcc.bat | 6 +- snes/ppu.c | 2 +- snes/ppu.h | 4 +- ancilla.c => src/ancilla.c | 0 ancilla.h => src/ancilla.h | 0 assets.h => src/assets.h | 0 attract.c => src/attract.c | 0 attract.h => src/attract.h | 0 audio.c => src/audio.c | 0 audio.h => src/audio.h | 0 config.c => src/config.c | 0 config.h => src/config.h | 0 dungeon.c => src/dungeon.c | 0 dungeon.h => src/dungeon.h | 0 ending.c => src/ending.c | 0 ending.h => src/ending.h | 0 features.h => src/features.h | 0 glsl_shader.c => src/glsl_shader.c | 0 glsl_shader.h => src/glsl_shader.h | 0 hud.c => src/hud.c | 0 hud.h => src/hud.h | 0 load_gfx.c => src/load_gfx.c | 0 load_gfx.h => src/load_gfx.h | 0 main.c => src/main.c | 4 +- messaging.c => src/messaging.c | 0 messaging.h => src/messaging.h | 0 misc.c => src/misc.c | 0 misc.h => src/misc.h | 0 nmi.c => src/nmi.c | 0 nmi.h => src/nmi.h | 0 opengl.c => src/opengl.c | 0 overlord.c => src/overlord.c | 0 overlord.h => src/overlord.h | 0 overworld.c => src/overworld.c | 0 overworld.h => src/overworld.h | 0 {platform => src/platform}/switch/.gitignore | 0 {platform => src/platform}/switch/Makefile | 0 {platform => src/platform}/switch/icon.jpg | Bin {platform => src/platform}/switch/zelda3.ini | 0 {platform => src/platform}/win32/resource.h | 0 {platform => src/platform}/win32/triforce.ico | Bin .../platform}/win32/volume_control.c | 0 .../platform}/win32/volume_control.h | 0 {platform => src/platform}/win32/zelda3.rc | 4 +- player.c => src/player.c | 0 player.h => src/player.h | 0 player_oam.c => src/player_oam.c | 0 player_oam.h => src/player_oam.h | 0 poly.c => src/poly.c | 0 poly.h => src/poly.h | 0 select_file.c => src/select_file.c | 0 select_file.h => src/select_file.h | 0 spc_player.c => src/spc_player.c | 0 spc_player.h => src/spc_player.h | 0 sprite.c => src/sprite.c | 0 sprite.h => src/sprite.h | 0 sprite_main.c => src/sprite_main.c | 0 sprite_main.h => src/sprite_main.h | 0 tagalong.c => src/tagalong.c | 0 tagalong.h => src/tagalong.h | 0 tile_detect.c => src/tile_detect.c | 0 tile_detect.h => src/tile_detect.h | 0 types.h => src/types.h | 0 util.c => src/util.c | 0 util.h => src/util.h | 0 variables.h => src/variables.h | 0 zelda_cpu_infra.c => src/zelda_cpu_infra.c | 0 zelda_cpu_infra.h => src/zelda_cpu_infra.h | 0 zelda_rtl.c => src/zelda_rtl.c | 0 zelda_rtl.h => src/zelda_rtl.h | 0 zelda3.vcxproj | 147 +++--- zelda3.vcxproj.filters | 456 +++++++++--------- 90 files changed, 369 insertions(+), 337 deletions(-) rename {tables => assets}/.gitignore (100%) rename {tables => assets}/compile_music.py (100%) rename {tables => assets}/compile_resources.py (97%) rename {tables => assets}/decode_music.py (100%) rename {tables => assets}/extract_music.py (100%) rename {tables => assets}/extract_resources.py (100%) rename {tables => assets}/palette_usage.bin (100%) rename {tables => assets}/restool.py (94%) rename {tables => assets}/sprite_sheet_info.py (100%) rename {tables => assets}/sprite_sheets.py (100%) rename {tables => assets}/sprites/.gitignore (100%) rename {tables => assets}/tables.py (100%) rename {tables => assets}/text_compression.py (100%) rename {tables => assets}/util.py (96%) create mode 100644 extract_assets.bat rename ancilla.c => src/ancilla.c (100%) rename ancilla.h => src/ancilla.h (100%) rename assets.h => src/assets.h (100%) rename attract.c => src/attract.c (100%) rename attract.h => src/attract.h (100%) rename audio.c => src/audio.c (100%) rename audio.h => src/audio.h (100%) rename config.c => src/config.c (100%) rename config.h => src/config.h (100%) rename dungeon.c => src/dungeon.c (100%) rename dungeon.h => src/dungeon.h (100%) rename ending.c => src/ending.c (100%) rename ending.h => src/ending.h (100%) rename features.h => src/features.h (100%) rename glsl_shader.c => src/glsl_shader.c (100%) rename glsl_shader.h => src/glsl_shader.h (100%) rename hud.c => src/hud.c (100%) rename hud.h => src/hud.h (100%) rename load_gfx.c => src/load_gfx.c (100%) rename load_gfx.h => src/load_gfx.h (100%) rename main.c => src/main.c (96%) rename messaging.c => src/messaging.c (100%) rename messaging.h => src/messaging.h (100%) rename misc.c => src/misc.c (100%) rename misc.h => src/misc.h (100%) rename nmi.c => src/nmi.c (100%) rename nmi.h => src/nmi.h (100%) rename opengl.c => src/opengl.c (100%) rename overlord.c => src/overlord.c (100%) rename overlord.h => src/overlord.h (100%) rename overworld.c => src/overworld.c (100%) rename overworld.h => src/overworld.h (100%) rename {platform => src/platform}/switch/.gitignore (100%) rename {platform => src/platform}/switch/Makefile (100%) rename {platform => src/platform}/switch/icon.jpg (100%) rename {platform => src/platform}/switch/zelda3.ini (100%) rename {platform => src/platform}/win32/resource.h (100%) rename {platform => src/platform}/win32/triforce.ico (100%) rename {platform => src/platform}/win32/volume_control.c (100%) rename {platform => src/platform}/win32/volume_control.h (100%) rename {platform => src/platform}/win32/zelda3.rc (92%) rename player.c => src/player.c (100%) rename player.h => src/player.h (100%) rename player_oam.c => src/player_oam.c (100%) rename player_oam.h => src/player_oam.h (100%) rename poly.c => src/poly.c (100%) rename poly.h => src/poly.h (100%) rename select_file.c => src/select_file.c (100%) rename select_file.h => src/select_file.h (100%) rename spc_player.c => src/spc_player.c (100%) rename spc_player.h => src/spc_player.h (100%) rename sprite.c => src/sprite.c (100%) rename sprite.h => src/sprite.h (100%) rename sprite_main.c => src/sprite_main.c (100%) rename sprite_main.h => src/sprite_main.h (100%) rename tagalong.c => src/tagalong.c (100%) rename tagalong.h => src/tagalong.h (100%) rename tile_detect.c => src/tile_detect.c (100%) rename tile_detect.h => src/tile_detect.h (100%) rename types.h => src/types.h (100%) rename util.c => src/util.c (100%) rename util.h => src/util.h (100%) rename variables.h => src/variables.h (100%) rename zelda_cpu_infra.c => src/zelda_cpu_infra.c (100%) rename zelda_cpu_infra.h => src/zelda_cpu_infra.h (100%) rename zelda_rtl.c => src/zelda_rtl.c (100%) rename zelda_rtl.h => src/zelda_rtl.h (100%) diff --git a/.gitignore b/.gitignore index abc5cfa..086d982 100644 --- a/.gitignore +++ b/.gitignore @@ -7,24 +7,24 @@ *.aps /obj/ /bin/ -/tables/overworld/*.yaml -/tables/dungeon/*.yaml -/tables/img/ -/tables/old/ -/tables/zelda3.sfc -/tables/zelda3.smc +/assets/overworld/*.yaml +/assets/dungeon/*.yaml +/assets/img/ +/assets/old/ +/zelda3.sfc +/zelda3.smc /saves/*.sav /saves/sram.dat /saves/sram.bak /zelda3 __pycache__ -/*.o +/src/*.o /*.exe /*.out /snes/*.o /msu/ /tmp/ -/tables/zelda3_assets.dat +/zelda3_assets.dat /SDL2.dll /zelda3.*.ini /zelda3.wiki diff --git a/Makefile b/Makefile index 473d9b0..5a8223b 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ TARGET_EXEC:=zelda3 ROM:=tables/zelda3.sfc -SRCS:=$(wildcard *.c snes/*.c) third_party/gl_core/gl_core_3_1.c third_party/opus-1.3.1-stripped/opus_decoder_amalgam.c +SRCS:=$(wildcard src/*.c snes/*.c) third_party/gl_core/gl_core_3_1.c third_party/opus-1.3.1-stripped/opus_decoder_amalgam.c OBJS:=$(SRCS:%.c=%.o) PYTHON:=/usr/bin/env python3 -CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-O2 -Werror) +CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-O2 -Werror) -I . CFLAGS:=${CFLAGS} $(shell sdl2-config --cflags) -DSYSTEM_VOLUME_MIXER_AVAILABLE=0 ifeq (${OS},Windows_NT) @@ -16,23 +16,23 @@ endif .PHONY: all clean clean_obj clean_gen -all: $(TARGET_EXEC) tables/zelda3_assets.dat +all: $(TARGET_EXEC) zelda3_assets.dat $(TARGET_EXEC): $(OBJS) $(RES) $(CC) $^ -o $@ $(LDFLAGS) $(SDLFLAGS) %.o : %.c $(CC) -c $(CFLAGS) $< -o $@ -$(RES): platform/win32/zelda3.rc +$(RES): src/platform/win32/zelda3.rc @echo "Generating Windows resources" @$(WINDRES) $< -O coff -o $@ -tables/zelda3_assets.dat: +zelda3_assets.dat: @echo "Extracting game resources" - @cd tables; $(PYTHON) restool.py --extract-from-rom -r ../$(ROM) + $(PYTHON) assets/restool.py --extract-from-rom clean: clean_obj clean_gen clean_obj: @$(RM) $(OBJS) $(TARGET_EXEC) clean_gen: - @$(RM) $(RES) tables/zelda3_assets.dat tables/*.txt tables/*.png tables/sprites/*.png tables/*.yaml + @$(RM) $(RES) zelda3_assets.dat tables/zelda3_assets.dat tables/*.txt tables/*.png tables/sprites/*.png tables/*.yaml @rm -rf tables/__pycache__ tables/dungeon tables/img tables/overworld tables/sound diff --git a/README.md b/README.md index 066150b..14c8366 100644 --- a/README.md +++ b/README.md @@ -49,17 +49,15 @@ Visit Wiki for more info on building the project: https://github.com/snesrev/zel ## Compiling on Windows with TCC (1mb Tiny C Compiler) 1. Download the project by clicking "Code > Download ZIP" on the github page 2. Extract the ZIP to your hard drive -3. Place the USA rom named `zelda3.sfc` in the "\tables" subfolder -4. Open the command prompt and navigate to that folder -5. Type `python restool.py --extract-from-rom` and hit enter -6. Close the command prompt -7. Download [TCC](https://github.com/FitzRoyX/tinycc/releases/download/tcc_20221020/tcc_20221020.zip) and extract to the "\third_party" subfolder -8. Download [SDL2](https://github.com/libsdl-org/SDL/releases/download/release-2.26.3/SDL2-devel-2.26.3-VC.zip) and extract to the "\third_party" subfolder -9. Double-click `run_with_tcc.bat` in the main dir to create `zelda3.exe` in that same dir -10. Configure with `zelda3.ini` in the main dir +3. Place the USA rom named `zelda3.sfc` in the root directory. +4. Double-click `extract_assets.bat` in the main dir to create `zelda3_assets.dat` in that same dir +5. Download [TCC](https://github.com/FitzRoyX/tinycc/releases/download/tcc_20221020/tcc_20221020.zip) and extract to the "\third_party" subfolder +6. Download [SDL2](https://github.com/libsdl-org/SDL/releases/download/release-2.26.3/SDL2-devel-2.26.3-VC.zip) and extract to the "\third_party" subfolder +7. Double-click `run_with_tcc.bat` in the main dir to create `zelda3.exe` in that same dir +8. Configure with `zelda3.ini` in the main dir ## Compiling on Windows with Visual Studio (4.5gb IDE and compiler) -Same Steps 1-7 above
+Same Steps 1-4 above
8. Double-click `Zelda3.sln`
9. Install the **Desktop development with C++** workload with the VS Installer if you don't have it already (it should prompt you to do this).
10. Change "debug" to "release" in the top dropdown
@@ -88,7 +86,7 @@ python3 -m pip install -r requirements.txt * macOS: `brew install sdl2` (you can get homebrew [here](https://brew.sh/)) ## Compiling on Linux/MacOS -1. Place your US ROM file named `zelda3.sfc` in `zelda3/tables` +1. Place your US ROM file named `zelda3.sfc` in `zelda3` 2. Compile ```sh make @@ -124,7 +122,7 @@ Look at the wiki at https://github.com/snesrev/zelda3/wiki for more help. The ROM needs to be named `zelda3.sfc` and has to be from the US region with this exact SHA256 hash `66871d66be19ad2c34c927d6b14cd8eb6fc3181965b6e517cb361f7316009cfb` -In case you're planning to move the executable to a different location, please include the file `tables/zelda3_assets.dat`. +In case you're planning to move the executable to a different location, please include the file `zelda3_assets.dat`. ## Usage and controls diff --git a/tables/.gitignore b/assets/.gitignore similarity index 100% rename from tables/.gitignore rename to assets/.gitignore diff --git a/tables/compile_music.py b/assets/compile_music.py similarity index 100% rename from tables/compile_music.py rename to assets/compile_music.py diff --git a/tables/compile_resources.py b/assets/compile_resources.py similarity index 97% rename from tables/compile_resources.py rename to assets/compile_resources.py index 945a406..cb87281 100644 --- a/tables/compile_resources.py +++ b/assets/compile_resources.py @@ -809,7 +809,7 @@ extern MemBlk FindInAssetArray(int asset, int idx); file_data += b'\0' file_data += v - open('zelda3_assets.dat', 'wb').write(file_data) + open('../zelda3_assets.dat', 'wb').write(file_data) def main(args): print_all(args) diff --git a/tables/decode_music.py b/assets/decode_music.py similarity index 100% rename from tables/decode_music.py rename to assets/decode_music.py diff --git a/tables/extract_music.py b/assets/extract_music.py similarity index 100% rename from tables/extract_music.py rename to assets/extract_music.py diff --git a/tables/extract_resources.py b/assets/extract_resources.py similarity index 100% rename from tables/extract_resources.py rename to assets/extract_resources.py diff --git a/tables/palette_usage.bin b/assets/palette_usage.bin similarity index 100% rename from tables/palette_usage.bin rename to assets/palette_usage.bin diff --git a/tables/restool.py b/assets/restool.py similarity index 94% rename from tables/restool.py rename to assets/restool.py index 301b5d7..4937c41 100644 --- a/tables/restool.py +++ b/assets/restool.py @@ -1,6 +1,10 @@ import argparse import util import sys +import os + +os.chdir(os.path.dirname(__file__)) + parser = argparse.ArgumentParser(description='Resource tool used to build zelda3_assets.dat', allow_abbrev=False) parser.add_argument('-r', '--rom', nargs='?', metavar='ROM') diff --git a/tables/sprite_sheet_info.py b/assets/sprite_sheet_info.py similarity index 100% rename from tables/sprite_sheet_info.py rename to assets/sprite_sheet_info.py diff --git a/tables/sprite_sheets.py b/assets/sprite_sheets.py similarity index 100% rename from tables/sprite_sheets.py rename to assets/sprite_sheets.py diff --git a/tables/sprites/.gitignore b/assets/sprites/.gitignore similarity index 100% rename from tables/sprites/.gitignore rename to assets/sprites/.gitignore diff --git a/tables/tables.py b/assets/tables.py similarity index 100% rename from tables/tables.py rename to assets/tables.py diff --git a/tables/text_compression.py b/assets/text_compression.py similarity index 100% rename from tables/text_compression.py rename to assets/text_compression.py diff --git a/tables/util.py b/assets/util.py similarity index 96% rename from tables/util.py rename to assets/util.py index d253beb..6a8ad82 100644 --- a/tables/util.py +++ b/assets/util.py @@ -10,7 +10,7 @@ def cache(user_function): # Both are common SNES rom extensions. For Zelda3 (NA), they are equivalent files. COMMON_ROM_NAMES = ['zelda3.sfc', 'zelda3.smc'] -DEFAULT_ROM_DIRECTORY = os.path.dirname(__file__) +DEFAULT_ROM_DIRECTORY = os.path.join(os.path.dirname(__file__), '..') ZELDA3_SHA1_US = '6D4F10A8B10E10DBE624CB23CF03B88BB8252973' ZELDA3_SHA1 = { diff --git a/extract_assets.bat b/extract_assets.bat new file mode 100644 index 0000000..79005ac --- /dev/null +++ b/extract_assets.bat @@ -0,0 +1,25 @@ +@echo off + +2>nul (del zelda3_assets.dat) +python assets/restool.py --extract-from-rom +IF NOT ERRORLEVEL 0 goto ERROR + +IF NOT EXIST "zelda3_assets.dat" ( + ECHO ERROR: The python program didn't generate zelda3_assets.dat successfully. + goto ERROR +) ELSE ( + REM +) + +goto DONE + + +:ERROR +ECHO: +ECHO ERROR: Asset extraction failed! +pause +EXIT /B 1 + +:DONE +echo Complete! +pause \ No newline at end of file diff --git a/run_with_tcc.bat b/run_with_tcc.bat index cb827da..a75c4ba 100644 --- a/run_with_tcc.bat +++ b/run_with_tcc.bat @@ -25,9 +25,9 @@ IF NOT EXIST "%SDL2%\lib\x64\SDL2.dll" ( REM ) -IF NOT EXIST "tables\zelda3_assets.dat" ( +IF NOT EXIST "zelda3_assets.dat" ( ECHO: - ECHO ERROR: tables\zelda3_assets.dat was not found. + ECHO ERROR: zelda3_assets.dat was not found. ECHO You need to extract assets from the ROM first, or get this file from a friend. Please see README.md ECHO: PAUSE @@ -38,7 +38,7 @@ IF NOT EXIST "tables\zelda3_assets.dat" ( echo Building with TCC... -third_party\tcc\tcc.exe -ozelda3.exe -DCOMPILER_TCC=1 -DSTBI_NO_SIMD=1 -DHAVE_STDINT_H=1 -D_HAVE_STDINT_H=1 -DSYSTEM_VOLUME_MIXER_AVAILABLE=0 -I%SDL2%/include -L%SDL2%/lib/x64 -lSDL2 *.c snes/*.c third_party/gl_core/gl_core_3_1.c third_party/opus-1.3.1-stripped/opus_decoder_amalgam.c +third_party\tcc\tcc.exe -ozelda3.exe -DCOMPILER_TCC=1 -DSTBI_NO_SIMD=1 -DHAVE_STDINT_H=1 -D_HAVE_STDINT_H=1 -DSYSTEM_VOLUME_MIXER_AVAILABLE=0 -I%SDL2%/include -L%SDL2%/lib/x64 -lSDL2 -I. src/*.c snes/*.c third_party/gl_core/gl_core_3_1.c third_party/opus-1.3.1-stripped/opus_decoder_amalgam.c IF ERRORLEVEL 1 goto GETOUT copy %SDL2%\lib\x64\SDL2.dll . diff --git a/snes/ppu.c b/snes/ppu.c index 311cc8e..e8f888f 100644 --- a/snes/ppu.c +++ b/snes/ppu.c @@ -6,7 +6,7 @@ #include #include #include "ppu.h" -#include "../types.h" +#include "src/types.h" static const uint8 kSpriteSizes[8][2] = { {8, 16}, {8, 32}, {8, 64}, {16, 32}, diff --git a/snes/ppu.h b/snes/ppu.h index 945392d..211a509 100644 --- a/snes/ppu.h +++ b/snes/ppu.h @@ -7,10 +7,10 @@ #include #include #include -#include "saveload.h" +#include "snes/saveload.h" typedef struct Ppu Ppu; -#include "../types.h" +#include "src/types.h" typedef struct BgLayer { uint16_t hScroll; diff --git a/ancilla.c b/src/ancilla.c similarity index 100% rename from ancilla.c rename to src/ancilla.c diff --git a/ancilla.h b/src/ancilla.h similarity index 100% rename from ancilla.h rename to src/ancilla.h diff --git a/assets.h b/src/assets.h similarity index 100% rename from assets.h rename to src/assets.h diff --git a/attract.c b/src/attract.c similarity index 100% rename from attract.c rename to src/attract.c diff --git a/attract.h b/src/attract.h similarity index 100% rename from attract.h rename to src/attract.h diff --git a/audio.c b/src/audio.c similarity index 100% rename from audio.c rename to src/audio.c diff --git a/audio.h b/src/audio.h similarity index 100% rename from audio.h rename to src/audio.h diff --git a/config.c b/src/config.c similarity index 100% rename from config.c rename to src/config.c diff --git a/config.h b/src/config.h similarity index 100% rename from config.h rename to src/config.h diff --git a/dungeon.c b/src/dungeon.c similarity index 100% rename from dungeon.c rename to src/dungeon.c diff --git a/dungeon.h b/src/dungeon.h similarity index 100% rename from dungeon.h rename to src/dungeon.h diff --git a/ending.c b/src/ending.c similarity index 100% rename from ending.c rename to src/ending.c diff --git a/ending.h b/src/ending.h similarity index 100% rename from ending.h rename to src/ending.h diff --git a/features.h b/src/features.h similarity index 100% rename from features.h rename to src/features.h diff --git a/glsl_shader.c b/src/glsl_shader.c similarity index 100% rename from glsl_shader.c rename to src/glsl_shader.c diff --git a/glsl_shader.h b/src/glsl_shader.h similarity index 100% rename from glsl_shader.h rename to src/glsl_shader.h diff --git a/hud.c b/src/hud.c similarity index 100% rename from hud.c rename to src/hud.c diff --git a/hud.h b/src/hud.h similarity index 100% rename from hud.h rename to src/hud.h diff --git a/load_gfx.c b/src/load_gfx.c similarity index 100% rename from load_gfx.c rename to src/load_gfx.c diff --git a/load_gfx.h b/src/load_gfx.h similarity index 100% rename from load_gfx.h rename to src/load_gfx.h diff --git a/main.c b/src/main.c similarity index 96% rename from main.c rename to src/main.c index 1c1920a..65ca764 100644 --- a/main.c +++ b/src/main.c @@ -810,9 +810,9 @@ uint32 g_asset_sizes[kNumberOfAssets]; static void LoadAssets() { size_t length = 0; - uint8 *data = ReadWholeFile("tables/zelda3_assets.dat", &length); + uint8 *data = ReadWholeFile("zelda3_assets.dat", &length); if (!data) - data = ReadWholeFile("zelda3_assets.dat", &length); + data = ReadWholeFile("tables/zelda3_assets.dat", &length); if (!data) Die("Failed to read zelda3_assets.dat. Please see the README for information about how you get this file."); static const char kAssetsSig[] = { kAssets_Sig }; diff --git a/messaging.c b/src/messaging.c similarity index 100% rename from messaging.c rename to src/messaging.c diff --git a/messaging.h b/src/messaging.h similarity index 100% rename from messaging.h rename to src/messaging.h diff --git a/misc.c b/src/misc.c similarity index 100% rename from misc.c rename to src/misc.c diff --git a/misc.h b/src/misc.h similarity index 100% rename from misc.h rename to src/misc.h diff --git a/nmi.c b/src/nmi.c similarity index 100% rename from nmi.c rename to src/nmi.c diff --git a/nmi.h b/src/nmi.h similarity index 100% rename from nmi.h rename to src/nmi.h diff --git a/opengl.c b/src/opengl.c similarity index 100% rename from opengl.c rename to src/opengl.c diff --git a/overlord.c b/src/overlord.c similarity index 100% rename from overlord.c rename to src/overlord.c diff --git a/overlord.h b/src/overlord.h similarity index 100% rename from overlord.h rename to src/overlord.h diff --git a/overworld.c b/src/overworld.c similarity index 100% rename from overworld.c rename to src/overworld.c diff --git a/overworld.h b/src/overworld.h similarity index 100% rename from overworld.h rename to src/overworld.h diff --git a/platform/switch/.gitignore b/src/platform/switch/.gitignore similarity index 100% rename from platform/switch/.gitignore rename to src/platform/switch/.gitignore diff --git a/platform/switch/Makefile b/src/platform/switch/Makefile similarity index 100% rename from platform/switch/Makefile rename to src/platform/switch/Makefile diff --git a/platform/switch/icon.jpg b/src/platform/switch/icon.jpg similarity index 100% rename from platform/switch/icon.jpg rename to src/platform/switch/icon.jpg diff --git a/platform/switch/zelda3.ini b/src/platform/switch/zelda3.ini similarity index 100% rename from platform/switch/zelda3.ini rename to src/platform/switch/zelda3.ini diff --git a/platform/win32/resource.h b/src/platform/win32/resource.h similarity index 100% rename from platform/win32/resource.h rename to src/platform/win32/resource.h diff --git a/platform/win32/triforce.ico b/src/platform/win32/triforce.ico similarity index 100% rename from platform/win32/triforce.ico rename to src/platform/win32/triforce.ico diff --git a/platform/win32/volume_control.c b/src/platform/win32/volume_control.c similarity index 100% rename from platform/win32/volume_control.c rename to src/platform/win32/volume_control.c diff --git a/platform/win32/volume_control.h b/src/platform/win32/volume_control.h similarity index 100% rename from platform/win32/volume_control.h rename to src/platform/win32/volume_control.h diff --git a/platform/win32/zelda3.rc b/src/platform/win32/zelda3.rc similarity index 92% rename from platform/win32/zelda3.rc rename to src/platform/win32/zelda3.rc index 4701546..333056e 100644 --- a/platform/win32/zelda3.rc +++ b/src/platform/win32/zelda3.rc @@ -27,7 +27,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 TEXTINCLUDE BEGIN - "platform\\win32\\resource.h\0" + "src\\platform\\win32\\resource.h\0" END 2 TEXTINCLUDE @@ -52,7 +52,7 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_ICON1 ICON "platform\\win32\\triforce.ico" +IDI_ICON1 ICON "src\\platform\\win32\\triforce.ico" #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/player.c b/src/player.c similarity index 100% rename from player.c rename to src/player.c diff --git a/player.h b/src/player.h similarity index 100% rename from player.h rename to src/player.h diff --git a/player_oam.c b/src/player_oam.c similarity index 100% rename from player_oam.c rename to src/player_oam.c diff --git a/player_oam.h b/src/player_oam.h similarity index 100% rename from player_oam.h rename to src/player_oam.h diff --git a/poly.c b/src/poly.c similarity index 100% rename from poly.c rename to src/poly.c diff --git a/poly.h b/src/poly.h similarity index 100% rename from poly.h rename to src/poly.h diff --git a/select_file.c b/src/select_file.c similarity index 100% rename from select_file.c rename to src/select_file.c diff --git a/select_file.h b/src/select_file.h similarity index 100% rename from select_file.h rename to src/select_file.h diff --git a/spc_player.c b/src/spc_player.c similarity index 100% rename from spc_player.c rename to src/spc_player.c diff --git a/spc_player.h b/src/spc_player.h similarity index 100% rename from spc_player.h rename to src/spc_player.h diff --git a/sprite.c b/src/sprite.c similarity index 100% rename from sprite.c rename to src/sprite.c diff --git a/sprite.h b/src/sprite.h similarity index 100% rename from sprite.h rename to src/sprite.h diff --git a/sprite_main.c b/src/sprite_main.c similarity index 100% rename from sprite_main.c rename to src/sprite_main.c diff --git a/sprite_main.h b/src/sprite_main.h similarity index 100% rename from sprite_main.h rename to src/sprite_main.h diff --git a/tagalong.c b/src/tagalong.c similarity index 100% rename from tagalong.c rename to src/tagalong.c diff --git a/tagalong.h b/src/tagalong.h similarity index 100% rename from tagalong.h rename to src/tagalong.h diff --git a/tile_detect.c b/src/tile_detect.c similarity index 100% rename from tile_detect.c rename to src/tile_detect.c diff --git a/tile_detect.h b/src/tile_detect.h similarity index 100% rename from tile_detect.h rename to src/tile_detect.h diff --git a/types.h b/src/types.h similarity index 100% rename from types.h rename to src/types.h diff --git a/util.c b/src/util.c similarity index 100% rename from util.c rename to src/util.c diff --git a/util.h b/src/util.h similarity index 100% rename from util.h rename to src/util.h diff --git a/variables.h b/src/variables.h similarity index 100% rename from variables.h rename to src/variables.h diff --git a/zelda_cpu_infra.c b/src/zelda_cpu_infra.c similarity index 100% rename from zelda_cpu_infra.c rename to src/zelda_cpu_infra.c diff --git a/zelda_cpu_infra.h b/src/zelda_cpu_infra.h similarity index 100% rename from zelda_cpu_infra.h rename to src/zelda_cpu_infra.h diff --git a/zelda_rtl.c b/src/zelda_rtl.c similarity index 100% rename from zelda_rtl.c rename to src/zelda_rtl.c diff --git a/zelda_rtl.h b/src/zelda_rtl.h similarity index 100% rename from zelda_rtl.h rename to src/zelda_rtl.h diff --git a/zelda3.vcxproj b/zelda3.vcxproj index f89c2bb..49b8956 100644 --- a/zelda3.vcxproj +++ b/zelda3.vcxproj @@ -126,12 +126,14 @@ stdc11 4244;4018;4996 true + $(SolutionDir);%(AdditionalIncludeDirectories) MachineX86 true Console kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + /PDBALTPATH:%_PDB% %(AdditionalOptions) @@ -143,6 +145,7 @@ stdc11 4244;4018;4996 true + $(SolutionDir);%(AdditionalIncludeDirectories) MachineX86 @@ -151,6 +154,7 @@ true true kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + /PDBALTPATH:%_PDB% %(AdditionalOptions) @@ -162,6 +166,7 @@ stdc11 4244;4018;4996 true + $(SolutionDir);%(AdditionalIncludeDirectories) MachineX86 @@ -171,6 +176,7 @@ true kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) $(IntDir)$(TargetName).pdb + /PDBALTPATH:%_PDB% %(AdditionalOptions) @@ -181,9 +187,11 @@ 4244;4018;4996 true WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS + $(SolutionDir);%(AdditionalIncludeDirectories) kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + /PDBALTPATH:%_PDB% %(AdditionalOptions) @@ -193,9 +201,11 @@ 4244;4018;4996 true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS + $(SolutionDir);%(AdditionalIncludeDirectories) kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + /PDBALTPATH:%_PDB% %(AdditionalOptions) @@ -205,38 +215,36 @@ 4244;4018;4996 true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS + $(SolutionDir);%(AdditionalIncludeDirectories) kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) $(IntDir)$(TargetName).pdb + /PDBALTPATH:%_PDB% %(AdditionalOptions) - - - - - - - - - - Disabled - Disabled - Disabled - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Disabled Disabled @@ -276,13 +284,10 @@ Disabled - - - - MaxSpeed - MaxSpeed - - + + + + true @@ -429,34 +434,34 @@ true true - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -470,10 +475,10 @@ - - - - + + + + true @@ -731,22 +736,22 @@ true true - - - - - - + + + + + + - + - - + + diff --git a/zelda3.vcxproj.filters b/zelda3.vcxproj.filters index a01fe08..6082b83 100644 --- a/zelda3.vcxproj.filters +++ b/zelda3.vcxproj.filters @@ -31,132 +31,12 @@ - - Snes - - - Snes - - - Snes - - - Snes - - - Snes - - - Snes - - - Snes - - - Snes - - - Snes - - - Snes - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Platform - - - Zelda - - - Snes - - - Zelda - - - Zelda - - - Zelda - third_party third_party\Opus - - Zelda - third_party\Opus @@ -211,8 +91,39 @@ third_party\Opus - - + + Snes + + + Snes + + + Snes + + + Snes + + + Snes + + + Snes + + + Snes + + + Snes + + + Snes + + + Snes + + + Snes + Snes @@ -243,114 +154,107 @@ Snes - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - - - Zelda - Snes - - Resource Files - - - Zelda - Snes - - Platform - - - Zelda - - - Zelda - Snes - + Zelda - - + + Zelda - + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + third_party - - Zelda - third_party\Opus @@ -447,23 +351,111 @@ third_party\Opus + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + + + Zelda + - - - - - Resource Files + + Zelda - - Resource Files + + Zelda - - - Resource Files - - Deploy @@ -481,6 +473,9 @@ Deploy\tables + + Zelda + @@ -523,4 +518,9 @@ Deploy\saverefs + + + Zelda + + \ No newline at end of file