diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87ee56388..8dd86a397 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,13 +12,13 @@ jobs: matrix: include: - name: "Debug, No F3DEX3" - args: RELEASE=0 CPP_DEFINES=-DENABLE_F3DEX3=0 + args: DEBUG_FEATURES=1 CPP_DEFINES=-DENABLE_F3DEX3=0 - name: "Debug, F3DEX3" - args: RELEASE=0 CPP_DEFINES=-DENABLE_F3DEX3=1 + args: DEBUG_FEATURES=1 CPP_DEFINES=-DENABLE_F3DEX3=1 - name: "Release, No F3DEX3" - args: RELEASE=1 CPP_DEFINES=-DENABLE_F3DEX3=0 + args: DEBUG_FEATURES=0 CPP_DEFINES=-DENABLE_F3DEX3=0 - name: "Release, F3DEX3" - args: RELEASE=1 CPP_DEFINES=-DENABLE_F3DEX3=1 + args: DEBUG_FEATURES=0 CPP_DEFINES=-DENABLE_F3DEX3=1 defaults: run: shell: bash diff --git a/.gitignore b/.gitignore index e49807cbb..21ba2828a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,9 @@ __pycache__/ .DS_Store # IDE files -.vscode/ +.vscode/*.* +.vscode/**/.* +!.vscode/c_cpp_properties.json .vs/ .idea/ .cache/ @@ -23,8 +25,8 @@ docs/doxygen/ *.iso *.bin *.blend1 -F3DEX3/*.code -F3DEX3/*.data +F3DEX3/*/*.code +F3DEX3/*/*.data wadextract/ isoextract/ diff --git a/.make_hackeroot.mk b/.make_hackeroot.mk index f42de8bd0..eba6578d1 100644 --- a/.make_hackeroot.mk +++ b/.make_hackeroot.mk @@ -1,49 +1,238 @@ -# Set prefix to mips binutils binaries (mips-linux-gnu-ld => 'mips-linux-gnu-') - Change at your own risk! -# In nearly all cases, not having 'mips-linux-gnu-*' binaries on the PATH is indicative of missing dependencies +#### Compiling #### # Returns the path to the command $(1) if exists. Otherwise returns an empty string. find-command = $(shell which $(1) 2>/dev/null) +# Set prefix to mips binutils binaries (mips-linux-gnu-ld => 'mips-linux-gnu-') - Change at your own risk! +# In nearly all cases, not having 'mips-linux-gnu-*' binaries on the PATH is indicative of missing dependencies ifneq ($(call find-command,mips-n64-ld),) - MIPS_BINUTILS_PREFIX := mips-n64- + MIPS_BINUTILS_PREFIX := mips-n64- else ifneq ($(call find-command,mips64-ld),) - MIPS_BINUTILS_PREFIX := mips64- + MIPS_BINUTILS_PREFIX := mips64- else ifneq ($(call find-command,mips-linux-gnu-ld),) - MIPS_BINUTILS_PREFIX := mips-linux-gnu- + MIPS_BINUTILS_PREFIX := mips-linux-gnu- else ifneq ($(call find-command,mips64-linux-gnu-ld),) - MIPS_BINUTILS_PREFIX := mips64-linux-gnu- + MIPS_BINUTILS_PREFIX := mips64-linux-gnu- else ifneq ($(call find-command,mips-ld),) - MIPS_BINUTILS_PREFIX := mips- + MIPS_BINUTILS_PREFIX := mips- else ifneq ($(call find-command,mips64-elf-ld),) - MIPS_BINUTILS_PREFIX := mips64-elf- + MIPS_BINUTILS_PREFIX := mips64-elf- else - $(error Unable to detect a suitable MIPS toolchain installed) + $(error Unable to detect a suitable MIPS toolchain installed) endif -include tools/print_rules.mk -# Enable optimization flags to use GDB on Ares -ARES_GDB := 1 - -# Toggle release or debug mode. 1=Release, 0=Debug -# Note: currently only used for HackerOoT -RELEASE := 0 - # Valid compression algorithms are 'yaz', 'gzip', 'lzo' and 'aplib' +# Default value: `yaz` COMPRESSION ?= yaz COMPRESSION_TYPE ?= $(shell echo $(COMPRESSION) | tr '[:lower:]' '[:upper:]') # Platform compatibility flags +# Default value: (nothing) TARGET ?= - ifeq ($(TARGET),wad) -CFLAGS := -DCONSOLE_WIIVC -fno-reorder-blocks -fno-optimize-sibling-calls -CPPFLAGS := -DCONSOLE_WIIVC +CFLAGS := -fno-reorder-blocks -fno-optimize-sibling-calls +CPP_DEFINES := -DCONSOLE_WIIVC +REVISION := 0 +REVISION := 0 else ifeq ($(TARGET),iso) -CFLAGS := -DCONSOLE_GC -fno-reorder-blocks -fno-optimize-sibling-calls -CPPFLAGS := -DCONSOLE_GC +CFLAGS := -fno-reorder-blocks -fno-optimize-sibling-calls +CPP_DEFINES := -DCONSOLE_GC +else +REVISION := 15 endif +# Set PACKAGE_NAME define for printing commit name +ifeq ($(origin PACKAGE_NAME), undefined) + PACKAGE_NAME := "$(shell git log -1 --pretty=%s | tr -d '()`"\n' | tr -d "'" | sed 's/\"/\\\"/g')" + ifeq ($(PACKAGE_NAME),"") + PACKAGE_NAME := "Unknown name" + endif +endif + +# Set PACKAGE_COMMIT_AUTHOR for printing commit author +ifeq ($(origin PACKAGE_COMMIT_AUTHOR), undefined) + PACKAGE_COMMIT_AUTHOR := "$(shell git log -1 --pretty=format:'%an' | tr -d '\n' | sed 's/\"/\\\"/g')" + ifeq ($(PACKAGE_COMMIT_AUTHOR),"") + PACKAGE_COMMIT_AUTHOR := "Unknown author" + endif +endif + +# Set PACKAGE_AUTHOR define for printing author's git name +ifeq ($(origin PACKAGE_AUTHOR), undefined) + PACKAGE_AUTHOR := "$(shell git config --get user.name | tr -d '\n' | sed 's/\"/\\\"/g')" + ifeq ($(PACKAGE_AUTHOR),"") + PACKAGE_AUTHOR := "Unknown author" + endif +endif + +# Set PACKAGE_VERSION define for printing commit hash +ifeq ($(origin PACKAGE_VERSION), undefined) + PACKAGE_VERSION := "$(shell git log -1 --pretty=%h | tr -d '\n' | sed 's/\"/\\\"/g')" + ifeq ($(PACKAGE_VERSION),"") + PACKAGE_VERSION := "Unknown version" + endif +endif + +# Define author and package version for every OoT version +CPP_DEFINES += -DCOMPRESS_$(COMPRESSION_TYPE)=1 -DPACKAGE_VERSION='$(PACKAGE_VERSION)' -DPACKAGE_NAME='$(PACKAGE_NAME)' -DPACKAGE_COMMIT_AUTHOR='$(PACKAGE_COMMIT_AUTHOR)' -DPACKAGE_AUTHOR='$(PACKAGE_AUTHOR)' + +# F3DZEX2 offsets +ifeq ($(VERSION),ntsc-1.0) +# 0xB59ED0, 0x1390 + UCODE_CODE_OFFSET := 11902672 + UCODE_CODE_SIZE := 5008 +# 0xB8A520, 0x420 + UCODE_DATA_OFFSET := 12100896 + UCODE_DATA_SIZE := 1056 +else ifeq ($(VERSION),ntsc-1.1) +# 0xB5A090, 0x1390 + UCODE_CODE_OFFSET := 11903120 + UCODE_CODE_SIZE := 5008 +# 0xB8A6E0, 0x420 + UCODE_DATA_OFFSET := 12101344 + UCODE_DATA_SIZE := 1056 +else ifeq ($(VERSION),ntsc-1.2) +# 0xB59ED0, 0x1390 + UCODE_CODE_OFFSET := 11902672 + UCODE_CODE_SIZE := 5008 +# 0xB8A590, 0x420 + UCODE_DATA_OFFSET := 12101008 + UCODE_DATA_SIZE := 1056 +else ifeq ($(VERSION),gc-eu-mq-dbg) +# 0xBCD0F0, 0x1630 + UCODE_CODE_OFFSET := 12374256 + UCODE_CODE_SIZE := 5680 +# 0xBCE720, 0x420 + UCODE_DATA_OFFSET := 12379936 + UCODE_DATA_SIZE := 1056 +else +$(error Unsupported version for F3DEX3: $(VERSION)) +endif + +# F3DEX3 directory +ifeq ($(PLATFORM),GC) +F3DEX3_BASE_DIR := gc +else +F3DEX3_BASE_DIR := n64 +endif +F3DEX3_DIR = F3DEX3/$(F3DEX3_BASE_DIR) + +#### Tools #### + +FLIPS := tools/Flips/flips +GZINJECT := tools/gzinject/gzinject + +# Temporary measure to avoid issues on ISO builds (same for `CFLAGS_IDO`). +# The real fix would be having the proper fixes in the N64 emulator itself +# but this requires some time to figure it out. +CC_IDO := tools/ido_recomp/$(DETECTED_OS)/5.3/cc + +#### Files #### + +# Config file used for building ISOs. +DMA_CONFIG_FILE := dma_config.txt + +# Baserom to use when creating BPS patches +BASEROM_PATCH ?= baseroms/$(VERSION)/baserom.z64 + +#### Build Rules #### + +# Build the codebase to inject in a WAD file (for Wii VC) +# Steps: +# - check if there's the common-key.bin file +# - build and compress the rom +# - inject the binary in the wad file (and apply patches) +# - remove temporary folders +wad: + $(call print_no_args,Patching WAD...) +ifeq ("$(wildcard baseroms/$(VERSION)/common-key.bin)", "") + $(error Please provide the common-key.bin file.) +endif + $(V)$(MAKE) compress TARGET=wad + $(V)$(GZINJECT) -a inject -r 1 -k baseroms/$(VERSION)/common-key.bin -w baseroms/$(VERSION)/basewad.wad -m $(ROMC) -o $(WAD) -t "HackerOoT" -i NHOE -p tools/gzinject/patches/NACE.gzi -p tools/gzinject/patches/gz_default_remap.gzi + $(V)$(RM) -r wadextract/ + $(call print_no_args,Success!) + +# Build the codebase to inject in a ISO file (for GameCube) +# Steps: +# - build and compress the rom +# - create the dma config file +# - extract the iso +# - copy the rom and dma config file to the extracted iso folder +# - remove any unnecessary files +# - apply the modifications on the emulator binary +# - pack the iso +# - remove temporary folders +iso: + $(V)$(MAKE) compress TARGET=iso + $(call print_no_args,Patching ISO...) + $(V)$(PYTHON) tools/gc_utility.py -v $(VERSION) -c $(COMPRESSION) + $(V)$(GZINJECT) -a extract -s baseroms/$(VERSION)/baseiso.iso + $(V)cp $(BUILD_DIR)/$(DMA_CONFIG_FILE) isoextract/zlj_f.tgc/$(DMA_CONFIG_FILE) + $(V)cp $(ROMC) isoextract/zlj_f.tgc/zlj_f.n64 + $(V)$(RM) -r isoextract/S_*.tgc/ isoextract/zlj_f.tgc/*.thp + $(V)$(FLIPS) --apply tools/gamecube.bps isoextract/zlj_f.tgc/main.dol isoextract/zlj_f.tgc/main.dol + $(V)$(GZINJECT) -a pack -s $(ISO) + $(V)$(RM) -r isoextract/ + $(call print_no_args,Success!) + +# Create a BPS patch for the built rom +# Steps: +# - run Flips and create the patch +# TODO: add compressed rom support. +patch: + $(call print_no_args,Creating BPS patch...) + $(V)$(FLIPS) --create --bps $(BASEROM_PATCH) $(ROM) $(BPS) + $(call print_no_args,Success!) + +# Create F3DEX3 bps patches +# Steps: +# - run Flips and create the patches +create_f3dex3_patches: F3DEX3/f3dzex2.code F3DEX3/f3dzex2.data + $(call print_no_args,Creating F3DEX3 patches...) + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.code $(F3DEX3_DIR)/F3DEX3_BrW.code $(F3DEX3_DIR)/F3DEX3_BrW.code.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.data $(F3DEX3_DIR)/F3DEX3_BrW.data $(F3DEX3_DIR)/F3DEX3_BrW.data.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.code $(F3DEX3_DIR)/F3DEX3_BrW_PA.code $(F3DEX3_DIR)/F3DEX3_BrW_PA.code.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.data $(F3DEX3_DIR)/F3DEX3_BrW_PA.data $(F3DEX3_DIR)/F3DEX3_BrW_PA.data.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.code $(F3DEX3_DIR)/F3DEX3_BrW_PB.code $(F3DEX3_DIR)/F3DEX3_BrW_PB.code.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.data $(F3DEX3_DIR)/F3DEX3_BrW_PB.data $(F3DEX3_DIR)/F3DEX3_BrW_PB.data.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.code $(F3DEX3_DIR)/F3DEX3_BrW_PC.code $(F3DEX3_DIR)/F3DEX3_BrW_PC.code.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.data $(F3DEX3_DIR)/F3DEX3_BrW_PC.data $(F3DEX3_DIR)/F3DEX3_BrW_PC.data.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.code $(F3DEX3_DIR)/F3DEX3_BrW_NOC.code $(F3DEX3_DIR)/F3DEX3_BrW_NOC.code.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.data $(F3DEX3_DIR)/F3DEX3_BrW_NOC.data $(F3DEX3_DIR)/F3DEX3_BrW_NOC.data.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.code $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PA.code $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PA.code.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.data $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PA.data $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PA.data.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.code $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PB.code $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PB.code.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.data $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PB.data $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PB.data.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.code $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PC.code $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PC.code.bps + $(V)$(FLIPS) --create --bps $(F3DEX3_DIR)/f3dzex2.data $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PC.data $(F3DEX3_DIR)/F3DEX3_BrW_NOC_PC.data.bps + $(call print_no_args,Success!) + +# Build the rom and print its checksum (using md5) +# Steps: +# - run `make clean` +# - build the rom +# - show the checksum +verify: + $(V)$(MAKE) clean + $(V)$(MAKE) rom + @md5sum $(ROM) + +.PHONY: wad iso patch create_f3dex3_patches verify + +$(F3DEX3_DIR)/f3dzex2.code: + $(V)dd bs=1 if=$(BASEROM_DIR)/baserom-decompressed.z64 of=$@ skip=$(UCODE_CODE_OFFSET) count=$(UCODE_CODE_SIZE) status=none + +$(F3DEX3_DIR)/f3dzex2.data: + $(V)dd bs=1 if=$(BASEROM_DIR)/baserom-decompressed.z64 of=$@ skip=$(UCODE_DATA_OFFSET) count=$(UCODE_DATA_SIZE) status=none + +$(F3DEX3_DIR)/F3DEX3%.code: $(F3DEX3_DIR)/F3DEX3%.code.bps $(F3DEX3_DIR)/f3dzex2.code + $(V)$(FLIPS) --apply $(F3DEX3_DIR)/F3DEX3$*.code.bps $(F3DEX3_DIR)/f3dzex2.code $@ + +$(F3DEX3_DIR)/F3DEX3%.data: $(F3DEX3_DIR)/F3DEX3%.data.bps $(F3DEX3_DIR)/f3dzex2.data + $(V)$(FLIPS) --apply $(F3DEX3_DIR)/F3DEX3$*.data.bps $(F3DEX3_DIR)/f3dzex2.data $@ ### SummerCart64 Settings ### # path to the deployer program diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 699036d62..e824e9cf1 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -1,7 +1,7 @@ { "configurations": [ { - "name": "oot-ntsc-1.2", + "name": "hackeroot-ntsc-1.2", "compilerArgs": [ "-m32" ], @@ -19,17 +19,14 @@ "OOT_REGION=REGION_JP", "PLATFORM_N64=1", "PLATFORM_GC=0", - "DEBUG_FEATURES=0", + "DEBUG_FEATURES=1", "NDEBUG", - "F3DEX_GBI_2", - "ENABLE_HACKEROOT=1", - "RELEASE_ROM=0", - "COMPRESS_YAZ=1" + "F3DEX_GBI_2" ], "cStandard": "gnu89" }, { - "name": "oot-gc-jp", + "name": "hackeroot-gc-jp", "compilerArgs": [ "-m32" ], @@ -56,7 +53,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-jp-mq", + "name": "hackeroot-gc-jp-mq", "compilerArgs": [ "-m32" ], @@ -83,7 +80,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-us", + "name": "hackeroot-gc-us", "compilerArgs": [ "-m32" ], @@ -110,7 +107,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-us-mq", + "name": "hackeroot-gc-us-mq", "compilerArgs": [ "-m32" ], @@ -137,7 +134,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-eu-mq-dbg", + "name": "hackeroot-gc-eu-mq-dbg", "compilerArgs": [ "-m32" ], @@ -164,7 +161,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-eu", + "name": "hackeroot-gc-eu", "compilerArgs": [ "-m32" ], @@ -191,7 +188,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-eu-mq", + "name": "hackeroot-gc-eu-mq", "compilerArgs": [ "-m32" ], @@ -218,7 +215,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-jp-ce", + "name": "hackeroot-gc-jp-ce", "compilerArgs": [ "-m32" ], @@ -243,36 +240,6 @@ "GBI_DOWHILE" ], "cStandard": "gnu89" - }, - { - "name": "hackeroot", - "compilerArgs": [ - "-m32" - ], - "includePath": [ - "include", - "include/libc", - "src", - "build/hackeroot-mq", - ".", - "extracted/hackeroot-mq" - ], - "defines": [ - "_LANGUAGE_C", - "OOT_VERSION=OOT_GC_EU_MQ_DBG", - "OOT_REGION=REGION_EU", - "PLATFORM_N64=0", - "PLATFORM_GC=1", - "DEBUG_FEATURES=1", - "NDEBUG", - "F3DEX_GBI_2", - "F3DEX_GBI_PL", - "GBI_DOWHILE", - "ENABLE_HACKEROOT=1", - "RELEASE_ROM=0", - "COMPRESS_YAZ=1" - ], - "cStandard": "gnu89" } ], "version": 4 diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 2d90e0357..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "search.useIgnoreFiles": false, - "search.exclude": { - "**/.git": true, - ".venv/**": true, - "baseroms/**": true, - "build/**": true, - "expected/**": true, - }, - "files.associations": { - "*.c": "c", - "*.h": "c", - "*.inc": "c", - "*.inc.c": "c", - }, - "editor.rulers": [ - 120 - ], -} diff --git a/F3DEX3/F3DEX3_BrW.code.bps b/F3DEX3/gc/F3DEX3_BrW.code.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW.code.bps rename to F3DEX3/gc/F3DEX3_BrW.code.bps diff --git a/F3DEX3/F3DEX3_BrW.data.bps b/F3DEX3/gc/F3DEX3_BrW.data.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW.data.bps rename to F3DEX3/gc/F3DEX3_BrW.data.bps diff --git a/F3DEX3/F3DEX3_BrW_NOC.code.bps b/F3DEX3/gc/F3DEX3_BrW_NOC.code.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_NOC.code.bps rename to F3DEX3/gc/F3DEX3_BrW_NOC.code.bps diff --git a/F3DEX3/F3DEX3_BrW_NOC.data.bps b/F3DEX3/gc/F3DEX3_BrW_NOC.data.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_NOC.data.bps rename to F3DEX3/gc/F3DEX3_BrW_NOC.data.bps diff --git a/F3DEX3/F3DEX3_BrW_NOC_PA.code.bps b/F3DEX3/gc/F3DEX3_BrW_NOC_PA.code.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_NOC_PA.code.bps rename to F3DEX3/gc/F3DEX3_BrW_NOC_PA.code.bps diff --git a/F3DEX3/F3DEX3_BrW_NOC_PA.data.bps b/F3DEX3/gc/F3DEX3_BrW_NOC_PA.data.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_NOC_PA.data.bps rename to F3DEX3/gc/F3DEX3_BrW_NOC_PA.data.bps diff --git a/F3DEX3/F3DEX3_BrW_NOC_PB.code.bps b/F3DEX3/gc/F3DEX3_BrW_NOC_PB.code.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_NOC_PB.code.bps rename to F3DEX3/gc/F3DEX3_BrW_NOC_PB.code.bps diff --git a/F3DEX3/F3DEX3_BrW_NOC_PB.data.bps b/F3DEX3/gc/F3DEX3_BrW_NOC_PB.data.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_NOC_PB.data.bps rename to F3DEX3/gc/F3DEX3_BrW_NOC_PB.data.bps diff --git a/F3DEX3/F3DEX3_BrW_NOC_PC.code.bps b/F3DEX3/gc/F3DEX3_BrW_NOC_PC.code.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_NOC_PC.code.bps rename to F3DEX3/gc/F3DEX3_BrW_NOC_PC.code.bps diff --git a/F3DEX3/F3DEX3_BrW_NOC_PC.data.bps b/F3DEX3/gc/F3DEX3_BrW_NOC_PC.data.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_NOC_PC.data.bps rename to F3DEX3/gc/F3DEX3_BrW_NOC_PC.data.bps diff --git a/F3DEX3/F3DEX3_BrW_PA.code.bps b/F3DEX3/gc/F3DEX3_BrW_PA.code.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_PA.code.bps rename to F3DEX3/gc/F3DEX3_BrW_PA.code.bps diff --git a/F3DEX3/F3DEX3_BrW_PA.data.bps b/F3DEX3/gc/F3DEX3_BrW_PA.data.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_PA.data.bps rename to F3DEX3/gc/F3DEX3_BrW_PA.data.bps diff --git a/F3DEX3/F3DEX3_BrW_PB.code.bps b/F3DEX3/gc/F3DEX3_BrW_PB.code.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_PB.code.bps rename to F3DEX3/gc/F3DEX3_BrW_PB.code.bps diff --git a/F3DEX3/F3DEX3_BrW_PB.data.bps b/F3DEX3/gc/F3DEX3_BrW_PB.data.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_PB.data.bps rename to F3DEX3/gc/F3DEX3_BrW_PB.data.bps diff --git a/F3DEX3/F3DEX3_BrW_PC.code.bps b/F3DEX3/gc/F3DEX3_BrW_PC.code.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_PC.code.bps rename to F3DEX3/gc/F3DEX3_BrW_PC.code.bps diff --git a/F3DEX3/F3DEX3_BrW_PC.data.bps b/F3DEX3/gc/F3DEX3_BrW_PC.data.bps similarity index 100% rename from F3DEX3/F3DEX3_BrW_PC.data.bps rename to F3DEX3/gc/F3DEX3_BrW_PC.data.bps diff --git a/F3DEX3/n64/F3DEX3_BrW.code.bps b/F3DEX3/n64/F3DEX3_BrW.code.bps new file mode 100644 index 000000000..f36d6ddbe Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW.code.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW.data.bps b/F3DEX3/n64/F3DEX3_BrW.data.bps new file mode 100644 index 000000000..e0625ffd5 Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW.data.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_NOC.code.bps b/F3DEX3/n64/F3DEX3_BrW_NOC.code.bps new file mode 100644 index 000000000..c7726d346 Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_NOC.code.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_NOC.data.bps b/F3DEX3/n64/F3DEX3_BrW_NOC.data.bps new file mode 100644 index 000000000..03854112c Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_NOC.data.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_NOC_PA.code.bps b/F3DEX3/n64/F3DEX3_BrW_NOC_PA.code.bps new file mode 100644 index 000000000..814dd80a6 Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_NOC_PA.code.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_NOC_PA.data.bps b/F3DEX3/n64/F3DEX3_BrW_NOC_PA.data.bps new file mode 100644 index 000000000..6994778e0 Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_NOC_PA.data.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_NOC_PB.code.bps b/F3DEX3/n64/F3DEX3_BrW_NOC_PB.code.bps new file mode 100644 index 000000000..22453ac06 Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_NOC_PB.code.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_NOC_PB.data.bps b/F3DEX3/n64/F3DEX3_BrW_NOC_PB.data.bps new file mode 100644 index 000000000..ca938fbc7 Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_NOC_PB.data.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_NOC_PC.code.bps b/F3DEX3/n64/F3DEX3_BrW_NOC_PC.code.bps new file mode 100644 index 000000000..c3973a6b1 Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_NOC_PC.code.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_NOC_PC.data.bps b/F3DEX3/n64/F3DEX3_BrW_NOC_PC.data.bps new file mode 100644 index 000000000..3392aef3b Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_NOC_PC.data.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_PA.code.bps b/F3DEX3/n64/F3DEX3_BrW_PA.code.bps new file mode 100644 index 000000000..cce5822cf Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_PA.code.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_PA.data.bps b/F3DEX3/n64/F3DEX3_BrW_PA.data.bps new file mode 100644 index 000000000..64b2045da Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_PA.data.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_PB.code.bps b/F3DEX3/n64/F3DEX3_BrW_PB.code.bps new file mode 100644 index 000000000..d2ec4c82b Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_PB.code.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_PB.data.bps b/F3DEX3/n64/F3DEX3_BrW_PB.data.bps new file mode 100644 index 000000000..19745fd08 Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_PB.data.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_PC.code.bps b/F3DEX3/n64/F3DEX3_BrW_PC.code.bps new file mode 100644 index 000000000..35de0acbd Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_PC.code.bps differ diff --git a/F3DEX3/n64/F3DEX3_BrW_PC.data.bps b/F3DEX3/n64/F3DEX3_BrW_PC.data.bps new file mode 100644 index 000000000..6fe193de6 Binary files /dev/null and b/F3DEX3/n64/F3DEX3_BrW_PC.data.bps differ diff --git a/INSTALLATION.md b/INSTALLATION.md index 566d24ef0..be6618616 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -68,7 +68,7 @@ cd HackerOoT #### 3. Prepare a base ROM -Place a copy of the Master Quest (Debug) ROM inside the `baseroms/hackeroot-mq/` folder. +Place a copy of the Master Quest (Debug) ROM inside the `baseroms/ntsc-1.2/` folder. Rename the file to `baserom.z64`, `baserom.n64` or `baserom.v64`, depending on the original extension. @@ -83,7 +83,7 @@ make setup ``` This downloads some dependencies (from pip), and compiles tools for the build process. -Then it generates a new ROM "baseroms/hackeroot-mq/baserom-decompressed.z64" that will have the overdump removed and the header patched. +Then it generates a new ROM "baseroms/ntsc-1.2/baserom-decompressed.z64" that will have the overdump removed and the header patched. It will also extract the individual assets from the ROM. This command will also setup F3DEX3 binaries. **NOTE:** the decompressed baserom will be copied to ``baseroms/gc-eu-mq-dbg/``, this is a temporary solution. @@ -97,7 +97,7 @@ Make sure your path to the project is not too long, otherwise this process may e make ``` -If all goes well, a new ROM should be built at `build/hackeroot-mq/hackeroot-mq.z64`. +If all goes well, a new ROM should be built at `build/ntsc-1.2/hackeroot-ntsc-1.2.z64`. **NOTE:** to speed up the build, you can either: @@ -131,7 +131,7 @@ To generate a .bps patch you can run the following command: make patch ``` -The patch will be in the ``build/hackeroot-mq/`` folder. +The patch will be in the ``build/ntsc-1.2/`` folder. #### 7. Toggle HackerOoT Features diff --git a/Makefile b/Makefile index ffe9e64f0..9601e1a5b 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,6 @@ SHELL = /usr/bin/env bash -include .make_options.mk -# HackerOoT options --include .make_hackeroot.mk - COMPILER ?= gcc # Target game version. Ensure the corresponding input ROM is placed in baseroms/$(VERSION)/baserom.z64. @@ -34,13 +31,7 @@ COMPILER ?= gcc # gc-eu-mq GameCube Europe/PAL Master Quest # gc-jp-ce GameCube Japan (Collector's Edition disc) # ique-cn iQue Player (Simplified Chinese) -# hackeroot-mq HackerOoT, based on gc-eu-mq-dbg (default) -# -# Note: choosing hackeroot-mq will enable HackerOoT features, -# if another version is chosen, this repo will be like -# zeldaret/main decomp but without the disassembly, decompilation -# and matching tools, including the IDO compiler -VERSION ?= hackeroot-mq +VERSION ?= ntsc-1.2 # Number of threads to extract and compress with. N_THREADS ?= $(shell nproc) # If DEBUG_OBJECTS is 1, produce additional debugging files such as objdump output or raw binaries for assets @@ -52,17 +43,12 @@ MIPS_BINUTILS_PREFIX ?= mips-linux-gnu- N64_EMULATOR ?= # Set to override game region in the ROM header (options: JP, US, EU). This can be used to build a fake US version # of the debug ROM for better emulator compatibility, or to build US versions of NTSC N64 ROMs. -# REGION ?= US +REGION ?= US # Set to enable debug features regardless of ROM version. # Note that by enabling debug features on non-debug ROM versions, some debug ROM specific assets will not be included. # This means the debug test scenes and some debug graphics in the elf_msg actors will not work as expected. # This may also be used to disable debug features on debug ROMs by setting DEBUG_FEATURES to 0 -# DEBUG_FEATURES ?= 1 - -CFLAGS ?= -CPPFLAGS ?= -CFLAGS_IDO ?= -CPP_DEFINES ?= +DEBUG_FEATURES ?= 1 # Version-specific settings REGIONAL_CHECKSUM := 0 @@ -182,30 +168,17 @@ else ifeq ($(VERSION),ique-cn) BUILD_DATE := 03-10-22 BUILD_TIME := 16:23:19 REVISION := 0 -else ifeq ($(VERSION),hackeroot-mq) - REGION := NULL - PLATFORM := GC - DEBUG := 1 - DEBUG_FEATURES ?= 1 - BUILD_CREATOR := none - BUILD_DATE := none - BUILD_TIME := none -ifeq ($(TARGET),iso) - REVISION := 0 -else ifeq ($(TARGET),wad) - REVISION := 0 -else - REVISION := 15 -endif else $(error Unsupported version $(VERSION)) endif -ifeq ($(VERSION),hackeroot-mq) - HACKEROOT := 1 -else - HACKEROOT := 0 -endif +CFLAGS ?= +CPPFLAGS ?= +CFLAGS_IDO ?= +CPP_DEFINES ?= + +# Add HackerOoT options +-include .make_hackeroot.mk ifeq ($(COMPILER),gcc) CPP_DEFINES += -DCOMPILER_GCC -DNON_MATCHING -DAVOID_UB -std=gnu11 @@ -238,45 +211,9 @@ else $(error Unsupported platform $(PLATFORM)) endif -# Set PACKAGE_NAME define for printing commit name -ifeq ($(origin PACKAGE_NAME), undefined) - PACKAGE_NAME := "$(shell git log -1 --pretty=%s | tr -d '()`"\n' | tr -d "'" | sed 's/\"/\\\"/g')" - ifeq ($(PACKAGE_NAME),"") - PACKAGE_NAME := "Unknown name" - endif -endif - -# Set PACKAGE_COMMIT_AUTHOR for printing commit author -ifeq ($(origin PACKAGE_COMMIT_AUTHOR), undefined) - PACKAGE_COMMIT_AUTHOR := "$(shell git log -1 --pretty=format:'%an' | tr -d '\n' | sed 's/\"/\\\"/g')" - ifeq ($(PACKAGE_COMMIT_AUTHOR),"") - PACKAGE_COMMIT_AUTHOR := "Unknown author" - endif -endif - -# Set PACKAGE_AUTHOR define for printing author's git name -ifeq ($(origin PACKAGE_AUTHOR), undefined) - PACKAGE_AUTHOR := "$(shell git config --get user.name | tr -d '\n' | sed 's/\"/\\\"/g')" - ifeq ($(PACKAGE_AUTHOR),"") - PACKAGE_AUTHOR := "Unknown author" - endif -endif - -# Set PACKAGE_VERSION define for printing commit hash -ifeq ($(origin PACKAGE_VERSION), undefined) - PACKAGE_VERSION := "$(shell git log -1 --pretty=%h | tr -d '\n' | sed 's/\"/\\\"/g')" - ifeq ($(PACKAGE_VERSION),"") - PACKAGE_VERSION := "Unknown version" - endif -endif - # Converts e.g. ntsc-1.0 to NTSC_1_0 -ifeq ($(VERSION),hackeroot-mq) -CPP_DEFINES += -DOOT_VERSION=GC_EU_MQ_DBG -DOOT_REVISION=$(REVISION) -else VERSION_MACRO := $(shell echo $(VERSION) | tr a-z-. A-Z__) CPP_DEFINES += -DOOT_VERSION=$(VERSION_MACRO) -DOOT_REVISION=$(REVISION) -endif CPP_DEFINES += -DOOT_REGION=REGION_$(REGION) CPP_DEFINES += -DLIBULTRA_VERSION=LIBULTRA_VERSION_$(LIBULTRA_VERSION) CPP_DEFINES += -DLIBULTRA_PATCH=$(LIBULTRA_PATCH) @@ -284,38 +221,18 @@ ifeq ($(PLATFORM),IQUE) CPP_DEFINES += -DBBPLAYER endif -ifeq ($(VERSION),hackeroot-mq) - CPP_DEFINES += -DENABLE_HACKEROOT=1 - OPTFLAGS := -Os +# Optimization flags +OPTFLAGS := -Os - ifeq ($(RELEASE),1) - CPP_DEFINES += -DRELEASE_ROM=1 -DDEBUG_FEATURES=0 -DNDEBUG - CFLAGS_IDO += -DDEBUG_FEATURES=0 - else - CPP_DEFINES += -DRELEASE_ROM=0 -DDEBUG_FEATURES=1 - endif +ifeq ($(DEBUG_FEATURES),1) + CPP_DEFINES += -DDEBUG_FEATURES=1 + OPTFLAGS += -ggdb3 else - ifeq ($(DEBUG_FEATURES),1) - CPP_DEFINES += -DDEBUG_FEATURES=1 - OPTFLAGS := -O2 - else - CPP_DEFINES += -DDEBUG_FEATURES=0 -DNDEBUG - OPTFLAGS := -O2 -g3 - endif - - CPP_DEFINES += -DENABLE_HACKEROOT=0 + CPP_DEFINES += -DNDEBUG -DDEBUG_FEATURES=0 + OPTFLAGS += -g3 endif ASOPTFLAGS := -O1 - -# Override optimization flags if using GDB -ifeq ($(ARES_GDB),1) - OPTFLAGS := -Og -ggdb3 -endif - -# Define author and package version for every OoT version -# Note: this won't be used if not using HackerOoT -CPP_DEFINES += -DCOMPRESS_$(COMPRESSION_TYPE)=1 -DPACKAGE_VERSION='$(PACKAGE_VERSION)' -DPACKAGE_NAME='$(PACKAGE_NAME)' -DPACKAGE_COMMIT_AUTHOR='$(PACKAGE_COMMIT_AUTHOR)' -DPACKAGE_AUTHOR='$(PACKAGE_AUTHOR)' OPTFLAGS += -ffast-math -fno-unsafe-math-optimizations ifeq ($(OS),Windows_NT) @@ -385,13 +302,10 @@ BIN2C := tools/bin2c N64TEXCONV := tools/assets/n64texconv/n64texconv FADO := tools/fado/fado.elf PYTHON ?= $(VENV)/bin/python3 -FLIPS := tools/Flips/flips -GZINJECT := tools/gzinject/gzinject -CC_IDO := tools/ido_recomp/$(DETECTED_OS)/5.3/cc -# Command to replace $(BUILD_DIR) in some files with the build path. +# Command to replace $(BUILD_DIR) and $(F3DEX3_DIR) in some files with the build path. # We can't use the C preprocessor for this because it won't substitute inside string literals. -BUILD_DIR_REPLACE := sed -e 's|$$(BUILD_DIR)|$(BUILD_DIR)|g' +BUILD_DIR_REPLACE := sed -e 's|$$(BUILD_DIR)|$(BUILD_DIR)|g' | sed -e 's|$$(F3DEX3_DIR)|$(F3DEX3_DIR)|g' # Audio tools SAMPLECONV := tools/audio/sampleconv/sampleconv @@ -443,26 +357,22 @@ OBJDUMP_FLAGS := -d -r -z -Mreg-names=32 #### Files #### # ROM image -ifeq ($(VERSION),hackeroot-mq) - ROM := $(BUILD_DIR)/$(VERSION).z64 -else - ROM := $(BUILD_DIR)/oot-$(VERSION).z64 -endif +ROM := $(BUILD_DIR)/hackeroot-$(VERSION).z64 ROMC := $(ROM:.z64=-compressed-$(COMPRESSION).z64) -WAD := $(ROM:.z64=.wad) -ISO := $(ROM:.z64=.iso) -BPS := $(ROM:.z64=.bps) ELF := $(ROM:.z64=.elf) MAP := $(ROM:.z64=.map) LDSCRIPT := $(ROM:.z64=.ld) -DMA_CONFIG_FILE := dma_config.txt - # description of ROM segments SPEC := spec/spec SPEC_INCLUDES := $(wildcard spec/*.inc) -# Baserom to use when creating BPS patches -BASEROM_PATCH ?= baseroms/$(VERSION)/baserom.z64 +# HackerOoT files +WAD := $(ROM:.z64=.wad) +ISO := $(ROM:.z64=.iso) +BPS := $(ROM:.z64=.bps) +UCODE_PATCHES := $(wildcard $(F3DEX3_DIR)/*.bps) +UCODE_FILES := $(foreach f,$(UCODE_PATCHES:.bps=),$f) +UCODE_O_FILES := $(foreach f,$(UCODE_FILES),$(BUILD_DIR)/$f.o) SRC_DIRS := $(shell find src -type d) UNDECOMPILED_DATA_DIRS := $(shell find data -type d) @@ -550,7 +460,7 @@ SPEC_O_FILES := $(shell $(CPP) $(CPPFLAGS) -I. $(SPEC) | $(BUILD_DIR_REPLACE) | O_FILES := $(filter-out %_reloc.o,$(SPEC_O_FILES)) OVL_RELOC_FILES := $(filter %_reloc.o,$(SPEC_O_FILES)) -UCODE_PATCHES := $(wildcard F3DEX3/*.bps) +UCODE_PATCHES := $(wildcard $(F3DEX3_DIR)/*.bps) UCODE_FILES := $(foreach f,$(UCODE_PATCHES:.bps=),$f) UCODE_O_FILES := $(foreach f,$(UCODE_FILES),$(BUILD_DIR)/$f.o) @@ -600,12 +510,14 @@ ifeq ($(COMPILER),gcc) $(BUILD_DIR)/src/libultra/libc/ll.o: OPTFLAGS := -Ofast $(BUILD_DIR)/src/overlays/%.o: CFLAGS += -fno-merge-constants -mno-explicit-relocs -mno-split-addresses +## HackerOoT overrides ## + $(BUILD_DIR)/src/overlays/actors/ovl_Item_Shield/%.o: OPTFLAGS := -O2 $(BUILD_DIR)/src/overlays/actors/ovl_En_Part/%.o: OPTFLAGS := -O2 $(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/%.o: OPTFLAGS := -O0 $(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hineri/%.o: OPTFLAGS := -O0 -# library overrides for Gamecube +# library overrides ifeq ($(TARGET),iso) MIPS_VERSION_IDO := -mips2 CFLAGS_IDO += -G 0 -non_shared -fullwarn -verbose -Xcpluscomm $(INC) -Wab,-r4300_mul -woff 516,609,649,838,712 @@ -634,6 +546,7 @@ ifeq ($(TARGET),iso) $(BUILD_DIR)/src/libultra/os/aisetnextbuf.o: CFLAGS := $(CFLAGS_IDO) $(BUILD_DIR)/src/libultra/os/aisetnextbuf.o: CC := $(CC_IDO) endif + endif #### Main Targets ### @@ -642,7 +555,6 @@ all: rom rom: $(call print_no_args,Building the rom...) - $(V)python3 tools/mod_assets.py --oot-version $(VERSION) $(V)$(MAKE) $(ROM) compress: @@ -653,29 +565,6 @@ compress: $(V)$(MAKE) $(ROMC) $(call print_no_args,Success!) -wad: - $(call print_no_args,Patching WAD...) -ifeq ("$(wildcard baseroms/$(VERSION)/common-key.bin)", "") - $(error Please provide the common-key.bin file.) -endif - $(V)$(MAKE) compress TARGET=wad - $(V)$(GZINJECT) -a inject -r 1 -k baseroms/$(VERSION)/common-key.bin -w baseroms/$(VERSION)/basewad.wad -m $(ROMC) -o $(WAD) -t "HackerOoT" -i NHOE -p tools/gzinject/patches/NACE.gzi -p tools/gzinject/patches/gz_default_remap.gzi - $(V)$(RM) -r wadextract/ - $(call print_no_args,Success!) - -iso: - $(V)$(MAKE) compress TARGET=iso - $(call print_no_args,Patching ISO...) - $(V)$(PYTHON) tools/gc_utility.py -v $(VERSION) -c $(COMPRESSION) - $(V)$(GZINJECT) -a extract -s baseroms/$(VERSION)/baseiso.iso - $(V)cp $(BUILD_DIR)/$(DMA_CONFIG_FILE) isoextract/zlj_f.tgc/$(DMA_CONFIG_FILE) - $(V)cp $(ROMC) isoextract/zlj_f.tgc/zlj_f.n64 - $(V)$(RM) -r isoextract/S_*.tgc/ isoextract/zlj_f.tgc/*.thp - $(V)$(FLIPS) --apply tools/gamecube.bps isoextract/zlj_f.tgc/main.dol isoextract/zlj_f.tgc/main.dol - $(V)$(GZINJECT) -a pack -s $(ISO) - $(V)$(RM) -r isoextract/ - $(call print_no_args,Success!) - clean: $(V)$(RM) -r $(BUILD_DIR) $(call print_no_args,Success!) @@ -688,7 +577,7 @@ distclean: $(V)$(RM) -r extracted/ $(V)$(RM) -r build/ $(V)$(MAKE) -C tools distclean - $(V)$(RM) -r F3DEX3/*.code F3DEX3/*.data + $(V)$(RM) -r F3DEX3/*/*.code F3DEX3/*/*.data $(call print_no_args,Success!) venv: @@ -719,38 +608,7 @@ ifeq ($(N64_EMULATOR),) endif $(N64_EMULATOR) $(ROM) -patch: - $(call print_no_args,Creating BPS patch...) - $(V)$(FLIPS) --create --bps $(BASEROM_PATCH) $(ROM) $(BPS) - $(call print_no_args,Success!) - -create_f3dex3_patches: F3DEX3/f3dzex2.code F3DEX3/f3dzex2.data - $(call print_no_args,Creating F3DEX3 patches...) - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.code F3DEX3/F3DEX3_BrW.code F3DEX3/F3DEX3_BrW.code.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.data F3DEX3/F3DEX3_BrW.data F3DEX3/F3DEX3_BrW.data.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.code F3DEX3/F3DEX3_BrW_PA.code F3DEX3/F3DEX3_BrW_PA.code.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.data F3DEX3/F3DEX3_BrW_PA.data F3DEX3/F3DEX3_BrW_PA.data.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.code F3DEX3/F3DEX3_BrW_PB.code F3DEX3/F3DEX3_BrW_PB.code.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.data F3DEX3/F3DEX3_BrW_PB.data F3DEX3/F3DEX3_BrW_PB.data.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.code F3DEX3/F3DEX3_BrW_PC.code F3DEX3/F3DEX3_BrW_PC.code.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.data F3DEX3/F3DEX3_BrW_PC.data F3DEX3/F3DEX3_BrW_PC.data.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.code F3DEX3/F3DEX3_BrW_NOC.code F3DEX3/F3DEX3_BrW_NOC.code.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.data F3DEX3/F3DEX3_BrW_NOC.data F3DEX3/F3DEX3_BrW_NOC.data.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.code F3DEX3/F3DEX3_BrW_NOC_PA.code F3DEX3/F3DEX3_BrW_NOC_PA.code.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.data F3DEX3/F3DEX3_BrW_NOC_PA.data F3DEX3/F3DEX3_BrW_NOC_PA.data.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.code F3DEX3/F3DEX3_BrW_NOC_PB.code F3DEX3/F3DEX3_BrW_NOC_PB.code.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.data F3DEX3/F3DEX3_BrW_NOC_PB.data F3DEX3/F3DEX3_BrW_NOC_PB.data.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.code F3DEX3/F3DEX3_BrW_NOC_PC.code F3DEX3/F3DEX3_BrW_NOC_PC.code.bps - $(V)$(FLIPS) --create --bps F3DEX3/f3dzex2.data F3DEX3/F3DEX3_BrW_NOC_PC.data F3DEX3/F3DEX3_BrW_NOC_PC.data.bps - $(call print_no_args,Success!) - -verify: - $(V)$(MAKE) clean - $(V)$(MAKE) rom - @md5sum $(ROM) - -.PHONY: all rom compress clean assetclean distclean venv setup run wad iso patch create_f3dex3_patches verify - +.PHONY: all rom compress clean assetclean distclean venv setup run .DEFAULT_GOAL := rom #### Various Recipes #### @@ -771,12 +629,15 @@ endif $(ROM): $(ELF) $(V)$(ELF2ROM) -cic $(CIC) $< $@ - @$(PRINT) "${BLINK}Build succeeded.\n$(NO_COL)" @$(PRINT) "==== Build Options ====$(NO_COL)\n" @$(PRINT) "${GREEN}OoT Version: $(BLUE)$(VERSION)$(NO_COL)\n" @$(PRINT) "${GREEN}Code Version: $(BLUE)$(PACKAGE_VERSION)$(NO_COL)\n" + @$(PRINT) "${GREEN}Debug Build: $(BLUE)$(DEBUG_FEATURES)$(NO_COL)\n" + @$(PRINT) "${GREEN}Opt. Flags: $(BLUE)$(OPTFLAGS)$(NO_COL)\n" + @$(PRINT) "${GREEN}Rom Path: $(BLUE)$(ROM)$(NO_COL)\n" @$(PRINT) "${GREEN}Build Author: $(BLUE)$(PACKAGE_AUTHOR)$(NO_COL)\n" @$(PRINT) "${GREEN}Commit Author: $(BLUE)$(PACKAGE_COMMIT_AUTHOR)$(NO_COL)\n" + @$(PRINT) "${BLINK}Build succeeded.\n$(NO_COL)" $(ROMC): $(ROM) $(ELF) $(BUILD_DIR)/compress_ranges.txt ifeq ($(USE_WRAPPER),0) @@ -805,6 +666,13 @@ $(ELF): $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) $(OVL_RELOC_FILES) $( $(BUILD_DIR)/linker_scripts/makerom.ld: linker_scripts/makerom.ld $(V)$(CPP) -I include $(CPPFLAGS) $< > $@ +$(BUILD_DIR)/$(F3DEX3_DIR)/%.o: $(F3DEX3_DIR)/% + $(call print_two_args,Wrapping binary to ELF:,$<,$@) + $(V)mkdir -p $(BUILD_DIR)/$(F3DEX3_DIR) + $(V)$(OBJCOPY) -I binary -O elf32-big $< $@ + +.PRECIOUS: $(UCODE_FILES) + ## Order-only prerequisites # These ensure e.g. the O_FILES are built before the OVL_RELOC_FILES. # The intermediate phony targets avoid quadratically-many dependencies between the targets and prerequisites. @@ -832,11 +700,6 @@ $(BUILD_DIR)/undefined_syms.txt: undefined_syms.txt $(BUILD_DIR)/baserom/%.o: $(EXTRACTED_DIR)/baserom/% $(call print_two_args,Wrapping binary to ELF:,$<,$@) $(V)$(OBJCOPY) -I binary -O elf32-big $< $@ - -$(BUILD_DIR)/F3DEX3/%.o: F3DEX3/% - $(call print_two_args,Wrapping binary to ELF:,$<,$@) - $(V)mkdir -p $(BUILD_DIR)/F3DEX3 - $(V)$(OBJCOPY) -I binary -O elf32-big $< $@ $(BUILD_DIR)/data/%.o: data/%.s $(call print_two_args,Assembling:,$<,$@) @@ -960,20 +823,6 @@ $(BUILD_DIR)/assets/%.bin.inc.c: $(EXTRACTED_DIR)/assets/%.bin $(BUILD_DIR)/assets/%.jpg.inc.c: $(EXTRACTED_DIR)/assets/%.jpg $(V)$(N64TEXCONV) JFIF "" $< $@ -F3DEX3/f3dzex2.code: - $(V)$(PYTHON) tools/data_extractor.py --start 0xBCD0F0 --size 0x1630 --input $(BASEROM_DIR)/baserom-decompressed.z64 --output $@ - -F3DEX3/f3dzex2.data: - $(V)$(PYTHON) tools/data_extractor.py --start 0xBCE720 --size 0x420 --input $(BASEROM_DIR)/baserom-decompressed.z64 --output $@ - -F3DEX3/F3DEX3%.code: F3DEX3/F3DEX3%.code.bps F3DEX3/f3dzex2.code - $(V)$(FLIPS) --apply F3DEX3/F3DEX3$*.code.bps F3DEX3/f3dzex2.code $@ - -F3DEX3/F3DEX3%.data: F3DEX3/F3DEX3%.data.bps F3DEX3/f3dzex2.data - $(V)$(FLIPS) --apply F3DEX3/F3DEX3$*.data.bps F3DEX3/f3dzex2.data $@ - -.PRECIOUS: $(UCODE_FILES) - # Audio AUDIO_BUILD_DEBUG ?= 0 diff --git a/README.md b/README.md index 2086ac7f7..9e602521e 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ It builds the following versions: | gc-jp-ce | 03-10-08 21:53:00 | GameCube Japan (Collector's Edition Disc) | `0c13e0449a28ea5b925cdb8af8d29768` | | ique-cn | 03-10-22 16:23:19 | iQue Player (Simplified Chinese) | `0ab48b2d44a74b3bb2d384f6170c2742` | -The default version is `hackeroot-mq`. +The default version is `ntsc-1.2`. This project is using the following tools: - [F3DEX3](https://github.com/HackerN64/F3DEX3), *will make you want to finally ditch HLE*, by Sauraen diff --git a/mod_assets/scenes/example/example_room_0_main.c b/assets/scenes/example/example_room_0_main.c similarity index 100% rename from mod_assets/scenes/example/example_room_0_main.c rename to assets/scenes/example/example_room_0_main.c diff --git a/mod_assets/scenes/example/example_room_0_model.c b/assets/scenes/example/example_room_0_model.c similarity index 100% rename from mod_assets/scenes/example/example_room_0_model.c rename to assets/scenes/example/example_room_0_model.c diff --git a/mod_assets/scenes/example/example_room_0_model_info.c b/assets/scenes/example/example_room_0_model_info.c similarity index 100% rename from mod_assets/scenes/example/example_room_0_model_info.c rename to assets/scenes/example/example_room_0_model_info.c diff --git a/mod_assets/scenes/example/example_scene.h b/assets/scenes/example/example_scene.h similarity index 99% rename from mod_assets/scenes/example/example_scene.h rename to assets/scenes/example/example_scene.h index 6e1108e70..5f0297ff2 100644 --- a/mod_assets/scenes/example/example_scene.h +++ b/assets/scenes/example/example_scene.h @@ -32,7 +32,7 @@ extern F3DEnvColor debug1_scene_header00_AnimatedMaterialColorEnvColor_02[]; extern u16 debug1_scene_header00_AnimatedMaterialColorKeyFrames_02[]; extern AnimatedMatColorParams debug1_scene_header00_AnimatedMaterialColorParams_02; extern AnimatedMaterial debug1_scene_header00_AnimatedMaterial[]; -#endif +#endif #if ENABLE_CUTSCENE_IMPROVEMENTS extern Vec3s debug1_scene_header00_ActorCutsceneCameraData[]; extern ActorCsCamInfo debug1_scene_header00_ActorCutsceneCameraInfo[]; diff --git a/mod_assets/scenes/example/example_scene_col.c b/assets/scenes/example/example_scene_col.c similarity index 100% rename from mod_assets/scenes/example/example_scene_col.c rename to assets/scenes/example/example_scene_col.c diff --git a/mod_assets/scenes/example/example_scene_cs_0.c b/assets/scenes/example/example_scene_cs_0.c similarity index 100% rename from mod_assets/scenes/example/example_scene_cs_0.c rename to assets/scenes/example/example_scene_cs_0.c diff --git a/mod_assets/scenes/example/example_scene_main.c b/assets/scenes/example/example_scene_main.c similarity index 100% rename from mod_assets/scenes/example/example_scene_main.c rename to assets/scenes/example/example_scene_main.c diff --git a/baseroms/gc-eu-mq-dbg/checksum-compressed.md5 b/baseroms/gc-eu-mq-dbg/checksum-compressed.md5 index d902d5fa9..b2fe3dd97 100644 --- a/baseroms/gc-eu-mq-dbg/checksum-compressed.md5 +++ b/baseroms/gc-eu-mq-dbg/checksum-compressed.md5 @@ -1 +1 @@ -9704bc98c20c20319cc1633fe02b6fc7 build/gc-eu-mq-dbg/oot-gc-eu-mq-dbg-compressed.z64 +9704bc98c20c20319cc1633fe02b6fc7 build/gc-eu-mq-dbg/hackeroot-gc-eu-mq-dbg-compressed.z64 diff --git a/baseroms/gc-eu-mq-dbg/checksum.md5 b/baseroms/gc-eu-mq-dbg/checksum.md5 index 69e361d6a..587f28e87 100644 --- a/baseroms/gc-eu-mq-dbg/checksum.md5 +++ b/baseroms/gc-eu-mq-dbg/checksum.md5 @@ -1 +1 @@ -75e344f41c26ec2ec5ad92caa9e25629 build/gc-eu-mq-dbg/oot-gc-eu-mq-dbg.z64 +75e344f41c26ec2ec5ad92caa9e25629 build/gc-eu-mq-dbg/hackeroot-gc-eu-mq-dbg.z64 diff --git a/baseroms/gc-eu-mq/checksum-compressed.md5 b/baseroms/gc-eu-mq/checksum-compressed.md5 index baf83abd5..fa82e7a86 100644 --- a/baseroms/gc-eu-mq/checksum-compressed.md5 +++ b/baseroms/gc-eu-mq/checksum-compressed.md5 @@ -1 +1 @@ -1618403427e4344a57833043db5ce3c3 build/gc-eu-mq/oot-gc-eu-mq-compressed.z64 +1618403427e4344a57833043db5ce3c3 build/gc-eu-mq/hackeroot-gc-eu-mq-compressed.z64 diff --git a/baseroms/gc-eu-mq/checksum.md5 b/baseroms/gc-eu-mq/checksum.md5 index 7d78aaf06..76bb6571c 100644 --- a/baseroms/gc-eu-mq/checksum.md5 +++ b/baseroms/gc-eu-mq/checksum.md5 @@ -1 +1 @@ -4920520254b9aab86de57b42ab477dbb build/gc-eu-mq/oot-gc-eu-mq.z64 +4920520254b9aab86de57b42ab477dbb build/gc-eu-mq/hackeroot-gc-eu-mq.z64 diff --git a/baseroms/gc-eu/checksum-compressed.md5 b/baseroms/gc-eu/checksum-compressed.md5 index 5525ac5dc..746d7272d 100644 --- a/baseroms/gc-eu/checksum-compressed.md5 +++ b/baseroms/gc-eu/checksum-compressed.md5 @@ -1 +1 @@ -2c27b4e000e85fd78dbca551f1b1c965 build/gc-eu/oot-gc-eu-compressed.z64 +2c27b4e000e85fd78dbca551f1b1c965 build/gc-eu/hackeroot-gc-eu-compressed.z64 diff --git a/baseroms/gc-eu/checksum.md5 b/baseroms/gc-eu/checksum.md5 index 960213bea..c982db842 100644 --- a/baseroms/gc-eu/checksum.md5 +++ b/baseroms/gc-eu/checksum.md5 @@ -1 +1 @@ -05d6c0a3528d6de7472e5a98520d9f46 build/gc-eu/oot-gc-eu.z64 +05d6c0a3528d6de7472e5a98520d9f46 build/gc-eu/hackeroot-gc-eu.z64 diff --git a/baseroms/gc-jp-ce/checksum-compressed.md5 b/baseroms/gc-jp-ce/checksum-compressed.md5 index 64f7a5219..39690fae9 100644 --- a/baseroms/gc-jp-ce/checksum-compressed.md5 +++ b/baseroms/gc-jp-ce/checksum-compressed.md5 @@ -1 +1 @@ -0c13e0449a28ea5b925cdb8af8d29768 build/gc-jp-ce/oot-gc-jp-ce-compressed.z64 +0c13e0449a28ea5b925cdb8af8d29768 build/gc-jp-ce/hackeroot-gc-jp-ce-compressed.z64 diff --git a/baseroms/gc-jp-ce/checksum.md5 b/baseroms/gc-jp-ce/checksum.md5 index 2959de97b..c0cf4188b 100644 --- a/baseroms/gc-jp-ce/checksum.md5 +++ b/baseroms/gc-jp-ce/checksum.md5 @@ -1 +1 @@ -fe2f22c16e03762513b5af5449d453aa build/gc-jp-ce/oot-gc-jp-ce.z64 +fe2f22c16e03762513b5af5449d453aa build/gc-jp-ce/hackeroot-gc-jp-ce.z64 diff --git a/baseroms/gc-jp-mq/checksum-compressed.md5 b/baseroms/gc-jp-mq/checksum-compressed.md5 index 8a583aa52..9eb1d7259 100644 --- a/baseroms/gc-jp-mq/checksum-compressed.md5 +++ b/baseroms/gc-jp-mq/checksum-compressed.md5 @@ -1 +1 @@ -69895c5c78442260f6eafb2506dc482a build/gc-jp-mq/oot-gc-jp-mq-compressed.z64 +69895c5c78442260f6eafb2506dc482a build/gc-jp-mq/hackeroot-gc-jp-mq-compressed.z64 diff --git a/baseroms/gc-jp-mq/checksum.md5 b/baseroms/gc-jp-mq/checksum.md5 index 69819ce2c..6c955a926 100644 --- a/baseroms/gc-jp-mq/checksum.md5 +++ b/baseroms/gc-jp-mq/checksum.md5 @@ -1 +1 @@ -f70cf137eb8f783cb5d79756190728ce build/gc-jp-mq/oot-gc-jp-mq.z64 +f70cf137eb8f783cb5d79756190728ce build/gc-jp-mq/hackeroot-gc-jp-mq.z64 diff --git a/baseroms/gc-jp/checksum-compressed.md5 b/baseroms/gc-jp/checksum-compressed.md5 index 8234b5cc8..e389e096e 100644 --- a/baseroms/gc-jp/checksum-compressed.md5 +++ b/baseroms/gc-jp/checksum-compressed.md5 @@ -1 +1 @@ -33fb7852c180b18ea0b9620b630f413f build/gc-jp/oot-gc-jp-compressed.z64 +33fb7852c180b18ea0b9620b630f413f build/gc-jp/hackeroot-gc-jp-compressed.z64 diff --git a/baseroms/gc-jp/checksum.md5 b/baseroms/gc-jp/checksum.md5 index e94a93036..8017439b8 100644 --- a/baseroms/gc-jp/checksum.md5 +++ b/baseroms/gc-jp/checksum.md5 @@ -1 +1 @@ -c72746a38cee7b25e6bbecde8db7e2d1 build/gc-jp/oot-gc-jp.z64 +c72746a38cee7b25e6bbecde8db7e2d1 build/gc-jp/hackeroot-gc-jp.z64 diff --git a/baseroms/gc-us-mq/checksum-compressed.md5 b/baseroms/gc-us-mq/checksum-compressed.md5 index 9288d1211..73fc4d2d3 100644 --- a/baseroms/gc-us-mq/checksum-compressed.md5 +++ b/baseroms/gc-us-mq/checksum-compressed.md5 @@ -1 +1 @@ -da35577fe54579f6a266931cc75f512d build/gc-us-mq/oot-gc-us-mq-compressed.z64 +da35577fe54579f6a266931cc75f512d build/gc-us-mq/hackeroot-gc-us-mq-compressed.z64 diff --git a/baseroms/gc-us-mq/checksum.md5 b/baseroms/gc-us-mq/checksum.md5 index 5d07400cc..f393991c7 100644 --- a/baseroms/gc-us-mq/checksum.md5 +++ b/baseroms/gc-us-mq/checksum.md5 @@ -1 +1 @@ -3f0d68ac5b8a9dc3898655025db474dd build/gc-us-mq/oot-gc-us-mq.z64 +3f0d68ac5b8a9dc3898655025db474dd build/gc-us-mq/hackeroot-gc-us-mq.z64 diff --git a/baseroms/gc-us/checksum-compressed.md5 b/baseroms/gc-us/checksum-compressed.md5 index 1871ba60c..5631fd39d 100644 --- a/baseroms/gc-us/checksum-compressed.md5 +++ b/baseroms/gc-us/checksum-compressed.md5 @@ -1 +1 @@ -cd09029edcfb7c097ac01986a0f83d3f build/gc-us/oot-gc-us-compressed.z64 +cd09029edcfb7c097ac01986a0f83d3f build/gc-us/hackeroot-gc-us-compressed.z64 diff --git a/baseroms/gc-us/checksum.md5 b/baseroms/gc-us/checksum.md5 index 160c935c7..a771b15f1 100644 --- a/baseroms/gc-us/checksum.md5 +++ b/baseroms/gc-us/checksum.md5 @@ -1 +1 @@ -282e6281bc7f030cddccf2422237e9a7 build/gc-us/oot-gc-us.z64 +282e6281bc7f030cddccf2422237e9a7 build/gc-us/hackeroot-gc-us.z64 diff --git a/baseroms/hackeroot-mq/checksum-compressed.md5 b/baseroms/hackeroot-mq/checksum-compressed.md5 deleted file mode 100644 index d902d5fa9..000000000 --- a/baseroms/hackeroot-mq/checksum-compressed.md5 +++ /dev/null @@ -1 +0,0 @@ -9704bc98c20c20319cc1633fe02b6fc7 build/gc-eu-mq-dbg/oot-gc-eu-mq-dbg-compressed.z64 diff --git a/baseroms/hackeroot-mq/checksum.md5 b/baseroms/hackeroot-mq/checksum.md5 deleted file mode 100644 index 78785e2f0..000000000 --- a/baseroms/hackeroot-mq/checksum.md5 +++ /dev/null @@ -1 +0,0 @@ -75e344f41c26ec2ec5ad92caa9e25629 build/hackeroot-mq/baserom.z64 diff --git a/baseroms/hackeroot-mq/config.yml b/baseroms/hackeroot-mq/config.yml deleted file mode 100644 index e45702806..000000000 --- a/baseroms/hackeroot-mq/config.yml +++ /dev/null @@ -1,1247 +0,0 @@ -dmadata_start: 0x12F70 -text_lang: PAL -incbins: - - name: ipl3 - segment: makerom - vram: 0x80000040 - size: 0xFC0 - - name: rspbootText - segment: boot - vram: 0x80009320 - size: 0xD0 - - name: aspMainText - segment: code - vram: 0x801120C0 - size: 0xFB0 - - name: gspS2DEX2d_fifoText - segment: code - vram: 0x80113070 - size: 0x18C0 - - name: njpgdspMainText - segment: code - vram: 0x80114930 - size: 0xAF0 - - name: gMojiFontTLUTs - segment: code - vram: 0x8012A740 - size: 0x80 - - name: gMojiFontTex - segment: code - vram: 0x8012A7C0 - size: 0x400 - - name: aspMainData - segment: code - vram: 0x80155C70 - size: 0x2E0 - - name: gspF3DZEX2_NoN_PosLight_fifoText - segment: code - vram: 0x80155F50 - size: 0x1630 - - name: gspF3DZEX2_NoN_PosLight_fifoData - segment: code - vram: 0x80157580 - size: 0x420 - - name: gspS2DEX2d_fifoData - segment: code - vram: 0x801579A0 - size: 0x390 - - name: njpgdspMainData - segment: code - vram: 0x80157D30 - size: 0x60 -variables: - gIdentityMtx: 0x8012DB20 - sNesMessageEntryTable: 0x8014B320 - sGerMessageEntryTable: 0x8014F548 - sFraMessageEntryTable: 0x80151658 - sStaffMessageEntryTable: 0x80153768 - gSoundFontTable: 0x801550D0 - gSequenceFontTable: 0x80155340 - gSequenceTable: 0x80155500 - gSampleBankTable: 0x80155BF0 - sShadowTex: 0x80A8E610 -assets: -- name: code/fbdemo_circle - xml_path: assets/xml/code/fbdemo_circle.xml - start_offset: 0x10ED48 - end_offset: 0x110038 -- name: code/fbdemo_triforce - xml_path: assets/xml/code/fbdemo_triforce.xml - start_offset: 0x10E1D0 - end_offset: 0x10E2A0 -- name: code/fbdemo_wipe1 - xml_path: assets/xml/code/fbdemo_wipe1.xml - start_offset: 0x10E2A0 - end_offset: 0x10ED28 -- name: misc/link_animetion - xml_path: assets/xml/misc/link_animetion.xml -- name: misc/z_select_static - xml_path: assets/xml/misc/z_select_static.xml -- name: objects/gameplay_dangeon_keep - xml_path: assets/xml/objects/gameplay_dangeon_keep.xml -- name: objects/gameplay_field_keep - xml_path: assets/xml/objects/gameplay_field_keep.xml -- name: objects/gameplay_keep - xml_path: assets/xml/objects/gameplay_keep_pal.xml -- name: objects/object_ahg - xml_path: assets/xml/objects/object_ahg.xml -- name: objects/object_am - xml_path: assets/xml/objects/object_am.xml -- name: objects/object_ane - xml_path: assets/xml/objects/object_ane.xml -- name: objects/object_ani - xml_path: assets/xml/objects/object_ani.xml -- name: objects/object_anubice - xml_path: assets/xml/objects/object_anubice.xml -- name: objects/object_aob - xml_path: assets/xml/objects/object_aob.xml -- name: objects/object_b_heart - xml_path: assets/xml/objects/object_b_heart.xml -- name: objects/object_Bb - xml_path: assets/xml/objects/object_Bb.xml -- name: objects/object_bba - xml_path: assets/xml/objects/object_bba.xml -- name: objects/object_bdan_objects - xml_path: assets/xml/objects/object_bdan_objects.xml -- name: objects/object_bdoor - xml_path: assets/xml/objects/object_bdoor.xml -- name: objects/object_bg - xml_path: assets/xml/objects/object_bg.xml -- name: objects/object_bigokuta - xml_path: assets/xml/objects/object_bigokuta.xml -- name: objects/object_bird - xml_path: assets/xml/objects/object_bird.xml -- name: objects/object_bji - xml_path: assets/xml/objects/object_bji.xml -- name: objects/object_bl - xml_path: assets/xml/objects/object_bl.xml -- name: objects/object_blkobj - xml_path: assets/xml/objects/object_blkobj.xml -- name: objects/object_bob - xml_path: assets/xml/objects/object_bob.xml -- name: objects/object_boj - xml_path: assets/xml/objects/object_boj.xml -- name: objects/object_bombf - xml_path: assets/xml/objects/object_bombf.xml -- name: objects/object_bombiwa - xml_path: assets/xml/objects/object_bombiwa.xml -- name: objects/object_bowl - xml_path: assets/xml/objects/object_bowl.xml -- name: objects/object_box - xml_path: assets/xml/objects/object_box.xml -- name: objects/object_brob - xml_path: assets/xml/objects/object_brob.xml -- name: objects/object_bubble - xml_path: assets/xml/objects/object_bubble.xml -- name: objects/object_bv - xml_path: assets/xml/objects/object_bv_pal.xml -- name: objects/object_bw - xml_path: assets/xml/objects/object_bw.xml -- name: objects/object_bwall - xml_path: assets/xml/objects/object_bwall.xml -- name: objects/object_bxa - xml_path: assets/xml/objects/object_bxa.xml -- name: objects/object_cne - xml_path: assets/xml/objects/object_cne.xml -- name: objects/object_cob - xml_path: assets/xml/objects/object_cob.xml -- name: objects/object_cow - xml_path: assets/xml/objects/object_cow.xml -- name: objects/object_crow - xml_path: assets/xml/objects/object_crow.xml -- name: objects/object_cs - xml_path: assets/xml/objects/object_cs.xml -- name: objects/object_d_elevator - xml_path: assets/xml/objects/object_d_elevator.xml -- name: objects/object_d_hsblock - xml_path: assets/xml/objects/object_d_hsblock.xml -- name: objects/object_d_lift - xml_path: assets/xml/objects/object_d_lift.xml -- name: objects/object_daiku - xml_path: assets/xml/objects/object_daiku.xml -- name: objects/object_ddan_objects - xml_path: assets/xml/objects/object_ddan_objects.xml -- name: objects/object_dekubaba - xml_path: assets/xml/objects/object_dekubaba.xml -- name: objects/object_dekujr - xml_path: assets/xml/objects/object_dekujr.xml -- name: objects/object_dekunuts - xml_path: assets/xml/objects/object_dekunuts.xml -- name: objects/object_demo_6k - xml_path: assets/xml/objects/object_demo_6k.xml -- name: objects/object_demo_kekkai - xml_path: assets/xml/objects/object_demo_kekkai.xml -- name: objects/object_demo_tre_lgt - xml_path: assets/xml/objects/object_demo_tre_lgt.xml -- name: objects/object_dh - xml_path: assets/xml/objects/object_dh.xml -- name: objects/object_dnk - xml_path: assets/xml/objects/object_dnk.xml -- name: objects/object_dns - xml_path: assets/xml/objects/object_dns.xml -- name: objects/object_dodojr - xml_path: assets/xml/objects/object_dodojr.xml -- name: objects/object_dodongo - xml_path: assets/xml/objects/object_dodongo.xml -- name: objects/object_dog - xml_path: assets/xml/objects/object_dog.xml -- name: objects/object_door_gerudo - xml_path: assets/xml/objects/object_door_gerudo.xml -- name: objects/object_door_killer - xml_path: assets/xml/objects/object_door_killer.xml -- name: objects/object_ds - xml_path: assets/xml/objects/object_ds.xml -- name: objects/object_ds2 - xml_path: assets/xml/objects/object_ds2.xml -- name: objects/object_du - xml_path: assets/xml/objects/object_du_pal.xml -- name: objects/object_dy_obj - xml_path: assets/xml/objects/object_dy_obj.xml -- name: objects/object_ec - xml_path: assets/xml/objects/object_ec.xml -- name: objects/object_efc_crystal_light - xml_path: assets/xml/objects/object_efc_crystal_light.xml -- name: objects/object_efc_doughnut - xml_path: assets/xml/objects/object_efc_doughnut.xml -- name: objects/object_efc_erupc - xml_path: assets/xml/objects/object_efc_erupc.xml -- name: objects/object_efc_fire_ball - xml_path: assets/xml/objects/object_efc_fire_ball.xml -- name: objects/object_efc_flash - xml_path: assets/xml/objects/object_efc_flash.xml -- name: objects/object_efc_lgt_shower - xml_path: assets/xml/objects/object_efc_lgt_shower.xml -- name: objects/object_efc_star_field - xml_path: assets/xml/objects/object_efc_star_field.xml -- name: objects/object_efc_tw - xml_path: assets/xml/objects/object_efc_tw.xml -- name: objects/object_ei - xml_path: assets/xml/objects/object_ei.xml -- name: objects/object_fa - xml_path: assets/xml/objects/object_fa.xml -- name: objects/object_fd - xml_path: assets/xml/objects/object_fd_pal.xml -- name: objects/object_fd2 - xml_path: assets/xml/objects/object_fd2.xml -- name: objects/object_fhg - xml_path: assets/xml/objects/object_fhg_pal.xml -- name: objects/object_fire - xml_path: assets/xml/objects/object_fire.xml -- name: objects/object_firefly - xml_path: assets/xml/objects/object_firefly.xml -- name: objects/object_fish - xml_path: assets/xml/objects/object_fish.xml -- name: objects/object_fr - xml_path: assets/xml/objects/object_fr.xml -- name: objects/object_fu - xml_path: assets/xml/objects/object_fu.xml -- name: objects/object_fw - xml_path: assets/xml/objects/object_fw.xml -- name: objects/object_fz - xml_path: assets/xml/objects/object_fz.xml -- name: objects/object_ganon - xml_path: assets/xml/objects/object_ganon_pal.xml -- name: objects/object_ganon2 - xml_path: assets/xml/objects/object_ganon2_pal.xml -- name: objects/object_ganon_anime1 - xml_path: assets/xml/objects/object_ganon_anime1.xml -- name: objects/object_ganon_anime2 - xml_path: assets/xml/objects/object_ganon_anime2.xml -- name: objects/object_ganon_anime3 - xml_path: assets/xml/objects/object_ganon_anime3.xml -- name: objects/object_ganon_objects - xml_path: assets/xml/objects/object_ganon_objects.xml -- name: objects/object_ge1 - xml_path: assets/xml/objects/object_ge1.xml -- name: objects/object_geff - xml_path: assets/xml/objects/object_geff.xml -- name: objects/object_geldb - xml_path: assets/xml/objects/object_geldb.xml -- name: objects/object_gi_arrow - xml_path: assets/xml/objects/object_gi_arrow.xml -- name: objects/object_gi_arrowcase - xml_path: assets/xml/objects/object_gi_arrowcase.xml -- name: objects/object_gi_bean - xml_path: assets/xml/objects/object_gi_bean.xml -- name: objects/object_gi_bomb_1 - xml_path: assets/xml/objects/object_gi_bomb_1.xml -- name: objects/object_gi_bomb_2 - xml_path: assets/xml/objects/object_gi_bomb_2.xml -- name: objects/object_gi_bombpouch - xml_path: assets/xml/objects/object_gi_bombpouch.xml -- name: objects/object_gi_boomerang - xml_path: assets/xml/objects/object_gi_boomerang.xml -- name: objects/object_gi_boots_2 - xml_path: assets/xml/objects/object_gi_boots_2.xml -- name: objects/object_gi_bosskey - xml_path: assets/xml/objects/object_gi_bosskey.xml -- name: objects/object_gi_bottle - xml_path: assets/xml/objects/object_gi_bottle.xml -- name: objects/object_gi_bottle_letter - xml_path: assets/xml/objects/object_gi_bottle_letter.xml -- name: objects/object_gi_bow - xml_path: assets/xml/objects/object_gi_bow.xml -- name: objects/object_gi_bracelet - xml_path: assets/xml/objects/object_gi_bracelet.xml -- name: objects/object_gi_brokensword - xml_path: assets/xml/objects/object_gi_brokensword.xml -- name: objects/object_gi_butterfly - xml_path: assets/xml/objects/object_gi_butterfly.xml -- name: objects/object_gi_clothes - xml_path: assets/xml/objects/object_gi_clothes.xml -- name: objects/object_gi_coin - xml_path: assets/xml/objects/object_gi_coin.xml -- name: objects/object_gi_compass - xml_path: assets/xml/objects/object_gi_compass.xml -- name: objects/object_gi_dekupouch - xml_path: assets/xml/objects/object_gi_dekupouch.xml -- name: objects/object_gi_egg - xml_path: assets/xml/objects/object_gi_egg.xml -- name: objects/object_gi_eye_lotion - xml_path: assets/xml/objects/object_gi_eye_lotion.xml -- name: objects/object_gi_fire - xml_path: assets/xml/objects/object_gi_fire.xml -- name: objects/object_gi_fish - xml_path: assets/xml/objects/object_gi_fish.xml -- name: objects/object_gi_frog - xml_path: assets/xml/objects/object_gi_frog.xml -- name: objects/object_gi_gerudo - xml_path: assets/xml/objects/object_gi_gerudo.xml -- name: objects/object_gi_gerudomask - xml_path: assets/xml/objects/object_gi_gerudomask.xml -- name: objects/object_gi_ghost - xml_path: assets/xml/objects/object_gi_ghost.xml -- name: objects/object_gi_glasses - xml_path: assets/xml/objects/object_gi_glasses.xml -- name: objects/object_gi_gloves - xml_path: assets/xml/objects/object_gi_gloves.xml -- name: objects/object_gi_goddess - xml_path: assets/xml/objects/object_gi_goddess.xml -- name: objects/object_gi_golonmask - xml_path: assets/xml/objects/object_gi_golonmask.xml -- name: objects/object_gi_grass - xml_path: assets/xml/objects/object_gi_grass.xml -- name: objects/object_gi_hammer - xml_path: assets/xml/objects/object_gi_hammer.xml -- name: objects/object_gi_heart - xml_path: assets/xml/objects/object_gi_heart.xml -- name: objects/object_gi_hearts - xml_path: assets/xml/objects/object_gi_hearts.xml -- name: objects/object_gi_hookshot - xml_path: assets/xml/objects/object_gi_hookshot.xml -- name: objects/object_gi_hoverboots - xml_path: assets/xml/objects/object_gi_hoverboots.xml -- name: objects/object_gi_insect - xml_path: assets/xml/objects/object_gi_insect.xml -- name: objects/object_gi_jewel - xml_path: assets/xml/objects/object_gi_jewel.xml -- name: objects/object_gi_key - xml_path: assets/xml/objects/object_gi_key.xml -- name: objects/object_gi_ki_tan_mask - xml_path: assets/xml/objects/object_gi_ki_tan_mask.xml -- name: objects/object_gi_letter - xml_path: assets/xml/objects/object_gi_letter.xml -- name: objects/object_gi_liquid - xml_path: assets/xml/objects/object_gi_liquid.xml -- name: objects/object_gi_longsword - xml_path: assets/xml/objects/object_gi_longsword.xml -- name: objects/object_gi_m_arrow - xml_path: assets/xml/objects/object_gi_m_arrow.xml -- name: objects/object_gi_magicpot - xml_path: assets/xml/objects/object_gi_magicpot.xml -- name: objects/object_gi_map - xml_path: assets/xml/objects/object_gi_map.xml -- name: objects/object_gi_medal - xml_path: assets/xml/objects/object_gi_medal.xml -- name: objects/object_gi_melody - xml_path: assets/xml/objects/object_gi_melody.xml -- name: objects/object_gi_milk - xml_path: assets/xml/objects/object_gi_milk.xml -- name: objects/object_gi_mushroom - xml_path: assets/xml/objects/object_gi_mushroom.xml -- name: objects/object_gi_niwatori - xml_path: assets/xml/objects/object_gi_niwatori.xml -- name: objects/object_gi_nuts - xml_path: assets/xml/objects/object_gi_nuts.xml -- name: objects/object_gi_ocarina - xml_path: assets/xml/objects/object_gi_ocarina.xml -- name: objects/object_gi_ocarina_0 - xml_path: assets/xml/objects/object_gi_ocarina_0.xml -- name: objects/object_gi_pachinko - xml_path: assets/xml/objects/object_gi_pachinko.xml -- name: objects/object_gi_powder - xml_path: assets/xml/objects/object_gi_powder.xml -- name: objects/object_gi_prescription - xml_path: assets/xml/objects/object_gi_prescription.xml -- name: objects/object_gi_purse - xml_path: assets/xml/objects/object_gi_purse.xml -- name: objects/object_gi_rabit_mask - xml_path: assets/xml/objects/object_gi_rabit_mask.xml -- name: objects/object_gi_redead_mask - xml_path: assets/xml/objects/object_gi_redead_mask.xml -- name: objects/object_gi_rupy - xml_path: assets/xml/objects/object_gi_rupy.xml -- name: objects/object_gi_saw - xml_path: assets/xml/objects/object_gi_saw.xml -- name: objects/object_gi_scale - xml_path: assets/xml/objects/object_gi_scale.xml -- name: objects/object_gi_seed - xml_path: assets/xml/objects/object_gi_seed.xml -- name: objects/object_gi_shield_1 - xml_path: assets/xml/objects/object_gi_shield_1.xml -- name: objects/object_gi_shield_2 - xml_path: assets/xml/objects/object_gi_shield_2.xml -- name: objects/object_gi_shield_3 - xml_path: assets/xml/objects/object_gi_shield_3.xml -- name: objects/object_gi_skj_mask - xml_path: assets/xml/objects/object_gi_skj_mask.xml -- name: objects/object_gi_soldout - xml_path: assets/xml/objects/object_gi_soldout.xml -- name: objects/object_gi_soul - xml_path: assets/xml/objects/object_gi_soul.xml -- name: objects/object_gi_stick - xml_path: assets/xml/objects/object_gi_stick.xml -- name: objects/object_gi_sutaru - xml_path: assets/xml/objects/object_gi_sutaru.xml -- name: objects/object_gi_sword_1 - xml_path: assets/xml/objects/object_gi_sword_1.xml -- name: objects/object_gi_ticketstone - xml_path: assets/xml/objects/object_gi_ticketstone.xml -- name: objects/object_gi_truth_mask - xml_path: assets/xml/objects/object_gi_truth_mask.xml -- name: objects/object_gi_zoramask - xml_path: assets/xml/objects/object_gi_zoramask.xml -- name: objects/object_gj - xml_path: assets/xml/objects/object_gj.xml -- name: objects/object_gjyo_objects - xml_path: assets/xml/objects/object_gjyo_objects.xml -- name: objects/object_gla - xml_path: assets/xml/objects/object_gla.xml -- name: objects/object_gm - xml_path: assets/xml/objects/object_gm.xml -- name: objects/object_gnd - xml_path: assets/xml/objects/object_gnd.xml -- name: objects/object_gnd_magic - xml_path: assets/xml/objects/object_gnd_magic.xml -- name: objects/object_gndd - xml_path: assets/xml/objects/object_gndd.xml -- name: objects/object_god_lgt - xml_path: assets/xml/objects/object_god_lgt.xml -- name: objects/object_gol - xml_path: assets/xml/objects/object_gol.xml -- name: objects/object_goma - xml_path: assets/xml/objects/object_goma_pal.xml -- name: objects/object_goroiwa - xml_path: assets/xml/objects/object_goroiwa.xml -- name: objects/object_gr - xml_path: assets/xml/objects/object_gr.xml -- name: objects/object_gs - xml_path: assets/xml/objects/object_gs.xml -- name: objects/object_gt - xml_path: assets/xml/objects/object_gt.xml -- name: objects/object_haka - xml_path: assets/xml/objects/object_haka.xml -- name: objects/object_haka_door - xml_path: assets/xml/objects/object_haka_door.xml -- name: objects/object_haka_objects - xml_path: assets/xml/objects/object_haka_objects.xml -- name: objects/object_hakach_objects - xml_path: assets/xml/objects/object_hakach_objects.xml -- name: objects/object_hata - xml_path: assets/xml/objects/object_hata.xml -- name: objects/object_heavy_object - xml_path: assets/xml/objects/object_heavy_object.xml -- name: objects/object_hidan_objects - xml_path: assets/xml/objects/object_hidan_objects.xml -- name: objects/object_hintnuts - xml_path: assets/xml/objects/object_hintnuts.xml -- name: objects/object_hni - xml_path: assets/xml/objects/object_hni.xml -- name: objects/object_horse - xml_path: assets/xml/objects/object_horse.xml -- name: objects/object_horse_ganon - xml_path: assets/xml/objects/object_horse_ganon.xml -- name: objects/object_horse_link_child - xml_path: assets/xml/objects/object_horse_link_child.xml -- name: objects/object_horse_normal - xml_path: assets/xml/objects/object_horse_normal.xml -- name: objects/object_horse_zelda - xml_path: assets/xml/objects/object_horse_zelda.xml -- name: objects/object_hs - xml_path: assets/xml/objects/object_hs.xml -- name: objects/object_human - xml_path: assets/xml/objects/object_human.xml -- name: objects/object_ice_objects - xml_path: assets/xml/objects/object_ice_objects.xml -- name: objects/object_ik - xml_path: assets/xml/objects/object_ik.xml -- name: objects/object_im - xml_path: assets/xml/objects/object_im.xml -- name: objects/object_in - xml_path: assets/xml/objects/object_in.xml -- name: objects/object_ingate - xml_path: assets/xml/objects/object_ingate.xml -- name: objects/object_jj - xml_path: assets/xml/objects/object_jj.xml -- name: objects/object_js - xml_path: assets/xml/objects/object_js.xml -- name: objects/object_jya_door - xml_path: assets/xml/objects/object_jya_door.xml -- name: objects/object_jya_iron - xml_path: assets/xml/objects/object_jya_iron.xml -- name: objects/object_jya_obj - xml_path: assets/xml/objects/object_jya_obj.xml -- name: objects/object_ka - xml_path: assets/xml/objects/object_ka.xml -- name: objects/object_kanban - xml_path: assets/xml/objects/object_kanban.xml -- name: objects/object_kibako2 - xml_path: assets/xml/objects/object_kibako2.xml -- name: objects/object_kingdodongo - xml_path: assets/xml/objects/object_kingdodongo_pal.xml -- name: objects/object_km1 - xml_path: assets/xml/objects/object_km1.xml -- name: objects/object_kusa - xml_path: assets/xml/objects/object_kusa.xml -- name: objects/object_kw1 - xml_path: assets/xml/objects/object_kw1.xml -- name: objects/object_kz - xml_path: assets/xml/objects/object_kz.xml -- name: objects/object_light_ring - xml_path: assets/xml/objects/object_light_ring.xml -- name: objects/object_lightbox - xml_path: assets/xml/objects/object_lightbox.xml -- name: objects/object_lightswitch - xml_path: assets/xml/objects/object_lightswitch.xml -- name: objects/object_link_boy - xml_path: assets/xml/objects/object_link_boy.xml -- name: objects/object_link_child - xml_path: assets/xml/objects/object_link_child.xml -- name: objects/object_ma1 - xml_path: assets/xml/objects/object_ma1.xml -- name: objects/object_ma2 - xml_path: assets/xml/objects/object_ma2.xml -- name: objects/object_mag - xml_path: assets/xml/objects/object_mag_v3_mq.xml -- name: objects/object_mamenoki - xml_path: assets/xml/objects/object_mamenoki.xml -- name: objects/object_mastergolon - xml_path: assets/xml/objects/object_mastergolon.xml -- name: objects/object_masterkokiri - xml_path: assets/xml/objects/object_masterkokiri.xml -- name: objects/object_masterkokirihead - xml_path: assets/xml/objects/object_masterkokirihead.xml -- name: objects/object_masterzoora - xml_path: assets/xml/objects/object_masterzoora.xml -- name: objects/object_mb - xml_path: assets/xml/objects/object_mb.xml -- name: objects/object_md - xml_path: assets/xml/objects/object_md.xml -- name: objects/object_medal - xml_path: assets/xml/objects/object_medal.xml -- name: objects/object_menkuri_objects - xml_path: assets/xml/objects/object_menkuri_objects.xml -- name: objects/object_mir_ray - xml_path: assets/xml/objects/object_mir_ray.xml -- name: objects/object_mizu_objects - xml_path: assets/xml/objects/object_mizu_objects.xml -- name: objects/object_mjin - xml_path: assets/xml/objects/object_mjin.xml -- name: objects/object_mjin_dark - xml_path: assets/xml/objects/object_mjin_dark.xml -- name: objects/object_mjin_flame - xml_path: assets/xml/objects/object_mjin_flame.xml -- name: objects/object_mjin_flash - xml_path: assets/xml/objects/object_mjin_flash.xml -- name: objects/object_mjin_ice - xml_path: assets/xml/objects/object_mjin_ice.xml -- name: objects/object_mjin_oka - xml_path: assets/xml/objects/object_mjin_oka.xml -- name: objects/object_mjin_soul - xml_path: assets/xml/objects/object_mjin_soul.xml -- name: objects/object_mjin_wind - xml_path: assets/xml/objects/object_mjin_wind.xml -- name: objects/object_mk - xml_path: assets/xml/objects/object_mk.xml -- name: objects/object_mm - xml_path: assets/xml/objects/object_mm.xml -- name: objects/object_mo - xml_path: assets/xml/objects/object_mo_pal.xml -- name: objects/object_mori_hineri1 - xml_path: assets/xml/objects/object_mori_hineri1.xml -- name: objects/object_mori_hineri1a - xml_path: assets/xml/objects/object_mori_hineri1a.xml -- name: objects/object_mori_hineri2 - xml_path: assets/xml/objects/object_mori_hineri2.xml -- name: objects/object_mori_hineri2a - xml_path: assets/xml/objects/object_mori_hineri2a.xml -- name: objects/object_mori_objects - xml_path: assets/xml/objects/object_mori_objects.xml -- name: objects/object_mori_tex - xml_path: assets/xml/objects/object_mori_tex.xml -- name: objects/object_ms - xml_path: assets/xml/objects/object_ms.xml -- name: objects/object_mu - xml_path: assets/xml/objects/object_mu.xml -- name: objects/object_nb - xml_path: assets/xml/objects/object_nb.xml -- name: objects/object_niw - xml_path: assets/xml/objects/object_niw.xml -- name: objects/object_nwc - xml_path: assets/xml/objects/object_nwc.xml -- name: objects/object_ny - xml_path: assets/xml/objects/object_ny.xml -- name: objects/object_o_anime - xml_path: assets/xml/objects/object_o_anime.xml -- name: objects/object_oA1 - xml_path: assets/xml/objects/object_oA1.xml -- name: objects/object_oA2 - xml_path: assets/xml/objects/object_oA2.xml -- name: objects/object_oA3 - xml_path: assets/xml/objects/object_oA3.xml -- name: objects/object_oA4 - xml_path: assets/xml/objects/object_oA4.xml -- name: objects/object_oA5 - xml_path: assets/xml/objects/object_oA5.xml -- name: objects/object_oA6 - xml_path: assets/xml/objects/object_oA6.xml -- name: objects/object_oA7 - xml_path: assets/xml/objects/object_oA7.xml -- name: objects/object_oA8 - xml_path: assets/xml/objects/object_oA8.xml -- name: objects/object_oA9 - xml_path: assets/xml/objects/object_oA9.xml -- name: objects/object_oA10 - xml_path: assets/xml/objects/object_oA10.xml -- name: objects/object_oA11 - xml_path: assets/xml/objects/object_oA11.xml -- name: objects/object_oB1 - xml_path: assets/xml/objects/object_oB1.xml -- name: objects/object_oB2 - xml_path: assets/xml/objects/object_oB2.xml -- name: objects/object_oB3 - xml_path: assets/xml/objects/object_oB3.xml -- name: objects/object_oB4 - xml_path: assets/xml/objects/object_oB4.xml -- name: objects/object_oE1 - xml_path: assets/xml/objects/object_oE1.xml -- name: objects/object_oE1s - xml_path: assets/xml/objects/object_oE1s.xml -- name: objects/object_oE2 - xml_path: assets/xml/objects/object_oE2.xml -- name: objects/object_oE3 - xml_path: assets/xml/objects/object_oE3.xml -- name: objects/object_oE4 - xml_path: assets/xml/objects/object_oE4.xml -- name: objects/object_oE4s - xml_path: assets/xml/objects/object_oE4s.xml -- name: objects/object_oE5 - xml_path: assets/xml/objects/object_oE5.xml -- name: objects/object_oE6 - xml_path: assets/xml/objects/object_oE6.xml -- name: objects/object_oE7 - xml_path: assets/xml/objects/object_oE7.xml -- name: objects/object_oE8 - xml_path: assets/xml/objects/object_oE8.xml -- name: objects/object_oE9 - xml_path: assets/xml/objects/object_oE9.xml -- name: objects/object_oE10 - xml_path: assets/xml/objects/object_oE10.xml -- name: objects/object_oE11 - xml_path: assets/xml/objects/object_oE11.xml -- name: objects/object_oE12 - xml_path: assets/xml/objects/object_oE12.xml -- name: objects/object_oE_anime - xml_path: assets/xml/objects/object_oE_anime.xml -- name: objects/object_oF1d_map - xml_path: assets/xml/objects/object_oF1d_map.xml -- name: objects/object_oF1s - xml_path: assets/xml/objects/object_oF1s.xml -- name: objects/object_okuta - xml_path: assets/xml/objects/object_okuta.xml -- name: objects/object_opening_demo1 - xml_path: assets/xml/objects/object_opening_demo1.xml -- name: objects/object_os - xml_path: assets/xml/objects/object_os.xml -- name: objects/object_os_anime - xml_path: assets/xml/objects/object_os_anime.xml -- name: objects/object_ossan - xml_path: assets/xml/objects/object_ossan.xml -- name: objects/object_ouke_haka - xml_path: assets/xml/objects/object_ouke_haka.xml -- name: objects/object_owl - xml_path: assets/xml/objects/object_owl.xml -- name: objects/object_peehat - xml_path: assets/xml/objects/object_peehat.xml -- name: objects/object_po_composer - xml_path: assets/xml/objects/object_po_composer.xml -- name: objects/object_po_field - xml_path: assets/xml/objects/object_po_field.xml -- name: objects/object_po_sisters - xml_path: assets/xml/objects/object_po_sisters.xml -- name: objects/object_poh - xml_path: assets/xml/objects/object_poh.xml -- name: objects/object_ps - xml_path: assets/xml/objects/object_ps.xml -- name: objects/object_pu_box - xml_path: assets/xml/objects/object_pu_box.xml -- name: objects/object_rd - xml_path: assets/xml/objects/object_rd.xml -- name: objects/object_reeba - xml_path: assets/xml/objects/object_reeba.xml -- name: objects/object_relay_objects - xml_path: assets/xml/objects/object_relay_objects.xml -- name: objects/object_rl - xml_path: assets/xml/objects/object_rl.xml -- name: objects/object_rr - xml_path: assets/xml/objects/object_rr.xml -- name: objects/object_rs - xml_path: assets/xml/objects/object_rs.xml -- name: objects/object_ru1 - xml_path: assets/xml/objects/object_ru1.xml -- name: objects/object_ru2 - xml_path: assets/xml/objects/object_ru2.xml -- name: objects/object_sa - xml_path: assets/xml/objects/object_sa.xml -- name: objects/object_sb - xml_path: assets/xml/objects/object_sb.xml -- name: objects/object_sd - xml_path: assets/xml/objects/object_sd.xml -- name: objects/object_shop_dungen - xml_path: assets/xml/objects/object_shop_dungen.xml -- name: objects/object_shopnuts - xml_path: assets/xml/objects/object_shopnuts.xml -- name: objects/object_siofuki - xml_path: assets/xml/objects/object_siofuki.xml -- name: objects/object_sk2 - xml_path: assets/xml/objects/object_sk2.xml -- name: objects/object_skb - xml_path: assets/xml/objects/object_skb.xml -- name: objects/object_skj - xml_path: assets/xml/objects/object_skj.xml -- name: objects/object_spot00_break - xml_path: assets/xml/objects/object_spot00_break.xml -- name: objects/object_spot00_objects - xml_path: assets/xml/objects/object_spot00_objects.xml -- name: objects/object_spot01_matoya - xml_path: assets/xml/objects/object_spot01_matoya.xml -- name: objects/object_spot01_matoyab - xml_path: assets/xml/objects/object_spot01_matoyab.xml -- name: objects/object_spot01_objects - xml_path: assets/xml/objects/object_spot01_objects.xml -- name: objects/object_spot01_objects2 - xml_path: assets/xml/objects/object_spot01_objects2.xml -- name: objects/object_spot02_objects - xml_path: assets/xml/objects/object_spot02_objects.xml -- name: objects/object_spot03_object - xml_path: assets/xml/objects/object_spot03_object.xml -- name: objects/object_spot04_objects - xml_path: assets/xml/objects/object_spot04_objects.xml -- name: objects/object_spot05_objects - xml_path: assets/xml/objects/object_spot05_objects.xml -- name: objects/object_spot06_objects - xml_path: assets/xml/objects/object_spot06_objects.xml -- name: objects/object_spot07_object - xml_path: assets/xml/objects/object_spot07_object.xml -- name: objects/object_spot08_obj - xml_path: assets/xml/objects/object_spot08_obj.xml -- name: objects/object_spot09_obj - xml_path: assets/xml/objects/object_spot09_obj.xml -- name: objects/object_spot11_obj - xml_path: assets/xml/objects/object_spot11_obj.xml -- name: objects/object_spot12_obj - xml_path: assets/xml/objects/object_spot12_obj.xml -- name: objects/object_spot15_obj - xml_path: assets/xml/objects/object_spot15_obj.xml -- name: objects/object_spot16_obj - xml_path: assets/xml/objects/object_spot16_obj.xml -- name: objects/object_spot17_obj - xml_path: assets/xml/objects/object_spot17_obj.xml -- name: objects/object_spot18_obj - xml_path: assets/xml/objects/object_spot18_obj.xml -- name: objects/object_ssh - xml_path: assets/xml/objects/object_ssh.xml -- name: objects/object_sst - xml_path: assets/xml/objects/object_sst_pal.xml -- name: objects/object_st - xml_path: assets/xml/objects/object_st.xml -- name: objects/object_stream - xml_path: assets/xml/objects/object_stream.xml -- name: objects/object_syokudai - xml_path: assets/xml/objects/object_syokudai.xml -- name: objects/object_ta - xml_path: assets/xml/objects/object_ta.xml -- name: objects/object_timeblock - xml_path: assets/xml/objects/object_timeblock.xml -- name: objects/object_tite - xml_path: assets/xml/objects/object_tite.xml -- name: objects/object_tk - xml_path: assets/xml/objects/object_tk.xml -- name: objects/object_toki_objects - xml_path: assets/xml/objects/object_toki_objects.xml -- name: objects/object_torch2 - xml_path: assets/xml/objects/object_torch2.xml -- name: objects/object_toryo - xml_path: assets/xml/objects/object_toryo.xml -- name: objects/object_tp - xml_path: assets/xml/objects/object_tp.xml -- name: objects/object_tr - xml_path: assets/xml/objects/object_tr.xml -- name: objects/object_trap - xml_path: assets/xml/objects/object_trap.xml -- name: objects/object_triforce_spot - xml_path: assets/xml/objects/object_triforce_spot.xml -- name: objects/object_ts - xml_path: assets/xml/objects/object_ts.xml -- name: objects/object_tsubo - xml_path: assets/xml/objects/object_tsubo.xml -- name: objects/object_tw - xml_path: assets/xml/objects/object_tw_pal.xml -- name: objects/object_umajump - xml_path: assets/xml/objects/object_umajump.xml -- name: objects/object_vali - xml_path: assets/xml/objects/object_vali.xml -- name: objects/object_vase - xml_path: assets/xml/objects/object_vase.xml -- name: objects/object_vm - xml_path: assets/xml/objects/object_vm.xml -- name: objects/object_wallmaster - xml_path: assets/xml/objects/object_wallmaster.xml -- name: objects/object_warp1 - xml_path: assets/xml/objects/object_warp1.xml -- name: objects/object_warp2 - xml_path: assets/xml/objects/object_warp2.xml -- name: objects/object_wf - xml_path: assets/xml/objects/object_wf.xml -- name: objects/object_wood02 - xml_path: assets/xml/objects/object_wood02.xml -- name: objects/object_xc - xml_path: assets/xml/objects/object_xc_pal.xml -- name: objects/object_yabusame_point - xml_path: assets/xml/objects/object_yabusame_point.xml -- name: objects/object_ydan_objects - xml_path: assets/xml/objects/object_ydan_objects.xml -- name: objects/object_yukabyun - xml_path: assets/xml/objects/object_yukabyun.xml -- name: objects/object_zf - xml_path: assets/xml/objects/object_zf.xml -- name: objects/object_zg - xml_path: assets/xml/objects/object_zg.xml -- name: objects/object_zl1 - xml_path: assets/xml/objects/object_zl1.xml -- name: objects/object_zl2 - xml_path: assets/xml/objects/object_zl2.xml -- name: objects/object_zl2_anime1 - xml_path: assets/xml/objects/object_zl2_anime1.xml -- name: objects/object_zl2_anime2 - xml_path: assets/xml/objects/object_zl2_anime2.xml -- name: objects/object_zl4 - xml_path: assets/xml/objects/object_zl4.xml -- name: objects/object_zo - xml_path: assets/xml/objects/object_zo.xml -- name: overlays/ovl_Arrow_Fire - xml_path: assets/xml/overlays/ovl_Arrow_Fire.xml - start_offset: 0x9D0 - end_offset: 0x1DF0 -- name: overlays/ovl_Arrow_Ice - xml_path: assets/xml/overlays/ovl_Arrow_Ice.xml - start_offset: 0x9F0 - end_offset: 0x1E10 -- name: overlays/ovl_Arrow_Light - xml_path: assets/xml/overlays/ovl_Arrow_Light.xml - start_offset: 0xA00 - end_offset: 0x1E20 -- name: overlays/ovl_Bg_Ganon_Otyuka - xml_path: assets/xml/overlays/ovl_Bg_Ganon_Otyuka.xml - start_offset: 0x11C0 - end_offset: 0x259C -- name: overlays/ovl_Bg_Jya_Cobra - xml_path: assets/xml/overlays/ovl_Bg_Jya_Cobra.xml - start_offset: 0x1980 - end_offset: 0x19F8 -- name: overlays/ovl_Boss_Dodongo - xml_path: assets/xml/overlays/ovl_Boss_Dodongo.xml - start_offset: 0x6238 - end_offset: 0x9238 -- name: overlays/ovl_Boss_Ganon - xml_path: assets/xml/overlays/ovl_Boss_Ganon.xml - start_offset: 0xE6B8 - end_offset: 0x211D8 -- name: overlays/ovl_Boss_Ganon2 - xml_path: assets/xml/overlays/ovl_Boss_Ganon2.xml - start_offset: 0xA2C8 - end_offset: 0x10778 -- name: overlays/ovl_Boss_Sst - xml_path: assets/xml/overlays/ovl_Boss_Sst.xml - start_offset: 0xA3C0 - end_offset: 0xAD70 -- name: overlays/ovl_Demo_Shd - xml_path: assets/xml/overlays/ovl_Demo_Shd.xml - start_offset: 0x450 - end_offset: 0x23D0 -- name: overlays/ovl_Effect_Ss_Fhg_Flash - xml_path: assets/xml/overlays/ovl_Effect_Ss_Fhg_Flash.xml - start_offset: 0xA60 - end_offset: 0xF18 -- name: overlays/ovl_Elf_Msg - xml_path: assets/xml/overlays/ovl_Elf_Msg.xml - start_offset: 0x758 - end_offset: 0x9D8 -- name: overlays/ovl_Elf_Msg2 - xml_path: assets/xml/overlays/ovl_Elf_Msg2.xml - start_offset: 0x538 - end_offset: 0x638 -- name: overlays/ovl_En_Bili - xml_path: assets/xml/overlays/ovl_En_Bili.xml - start_offset: 0x1E50 - end_offset: 0x1E70 -- name: overlays/ovl_En_Clear_Tag - xml_path: assets/xml/overlays/ovl_En_Clear_Tag.xml - start_offset: 0x26F0 - end_offset: 0x89F0 -- name: overlays/ovl_En_Ganon_Mant - xml_path: assets/xml/overlays/ovl_En_Ganon_Mant.xml - start_offset: 0x1218 - end_offset: 0x4118 -- name: overlays/ovl_En_Ganon_Organ - xml_path: assets/xml/overlays/ovl_En_Ganon_Organ.xml - start_offset: 0x3E8 - end_offset: 0x6F70 -- name: overlays/ovl_En_Holl - xml_path: assets/xml/overlays/ovl_En_Holl.xml - start_offset: 0xE78 - end_offset: 0xEE0 -- name: overlays/ovl_En_Jsjutan - xml_path: assets/xml/overlays/ovl_En_Jsjutan.xml - start_offset: 0x12F8 - end_offset: 0x4C90 -- name: overlays/ovl_En_Kanban - xml_path: assets/xml/overlays/ovl_En_Kanban.xml - start_offset: 0x2F80 - end_offset: 0x3040 -- name: overlays/ovl_En_Sda - xml_path: assets/xml/overlays/ovl_En_Sda.xml - start_offset: 0x1578 - end_offset: 0x1608 -- name: overlays/ovl_En_Ssh - xml_path: assets/xml/overlays/ovl_En_Ssh.xml - start_offset: 0x2150 - end_offset: 0x21E0 -- name: overlays/ovl_En_St - xml_path: assets/xml/overlays/ovl_En_St.xml - start_offset: 0x26B0 - end_offset: 0x2740 -- name: overlays/ovl_En_Sth - xml_path: assets/xml/overlays/ovl_En_Sth.xml - start_offset: 0xEF0 - end_offset: 0x3EC4 -- name: overlays/ovl_End_Title - xml_path: assets/xml/overlays/ovl_End_Title.xml - start_offset: 0x780 - end_offset: 0x4128 -- name: overlays/ovl_file_choose - xml_path: assets/xml/overlays/ovl_file_choose_pal_gc.xml - start_offset: 0xDE70 - end_offset: 0xE740 -- name: overlays/ovl_Magic_Dark - xml_path: assets/xml/overlays/ovl_Magic_Dark.xml - start_offset: 0xD10 - end_offset: 0x1740 -- name: overlays/ovl_Magic_Fire - xml_path: assets/xml/overlays/ovl_Magic_Fire.xml - start_offset: 0xB90 - end_offset: 0x21E0 -- name: overlays/ovl_Magic_Wind - xml_path: assets/xml/overlays/ovl_Magic_Wind.xml - start_offset: 0x780 - end_offset: 0x1C98 -- name: overlays/ovl_Oceff_Spot - xml_path: assets/xml/overlays/ovl_Oceff_Spot.xml - start_offset: 0x7F0 - end_offset: 0xEC8 -- name: overlays/ovl_Oceff_Storm - xml_path: assets/xml/overlays/ovl_Oceff_Storm.xml - start_offset: 0x7B0 - end_offset: 0x1B40 -- name: overlays/ovl_Oceff_Wipe - xml_path: assets/xml/overlays/ovl_Oceff_Wipe.xml - start_offset: 0x550 - end_offset: 0xD10 -- name: overlays/ovl_Oceff_Wipe2 - xml_path: assets/xml/overlays/ovl_Oceff_Wipe2.xml - start_offset: 0x480 - end_offset: 0x16E8 -- name: overlays/ovl_Oceff_Wipe3 - xml_path: assets/xml/overlays/ovl_Oceff_Wipe3.xml - start_offset: 0x480 - end_offset: 0x16C8 -- name: overlays/ovl_Oceff_Wipe4 - xml_path: assets/xml/overlays/ovl_Oceff_Wipe4.xml - start_offset: 0x460 - end_offset: 0xF48 -- name: scenes/dungeons/bdan - xml_path: assets/xml/scenes/dungeons/bdan_mq.xml -- name: scenes/dungeons/bdan_boss - xml_path: assets/xml/scenes/dungeons/bdan_boss.xml -- name: scenes/dungeons/Bmori1 - xml_path: assets/xml/scenes/dungeons/Bmori1_mq.xml -- name: scenes/dungeons/ddan - xml_path: assets/xml/scenes/dungeons/ddan_mq.xml -- name: scenes/dungeons/ddan_boss - xml_path: assets/xml/scenes/dungeons/ddan_boss_v2.xml -- name: scenes/dungeons/FIRE_bs - xml_path: assets/xml/scenes/dungeons/FIRE_bs.xml -- name: scenes/dungeons/ganon - xml_path: assets/xml/scenes/dungeons/ganon.xml -- name: scenes/dungeons/ganon_boss - xml_path: assets/xml/scenes/dungeons/ganon_boss.xml -- name: scenes/dungeons/ganon_demo - xml_path: assets/xml/scenes/dungeons/ganon_demo.xml -- name: scenes/dungeons/ganon_final - xml_path: assets/xml/scenes/dungeons/ganon_final.xml -- name: scenes/dungeons/ganon_sonogo - xml_path: assets/xml/scenes/dungeons/ganon_sonogo.xml -- name: scenes/dungeons/ganontika - xml_path: assets/xml/scenes/dungeons/ganontika_mq.xml -- name: scenes/dungeons/ganontikasonogo - xml_path: assets/xml/scenes/dungeons/ganontikasonogo.xml -- name: scenes/dungeons/gerudoway - xml_path: assets/xml/scenes/dungeons/gerudoway.xml -- name: scenes/dungeons/HAKAdan - xml_path: assets/xml/scenes/dungeons/HAKAdan_mq.xml -- name: scenes/dungeons/HAKAdan_bs - xml_path: assets/xml/scenes/dungeons/HAKAdan_bs.xml -- name: scenes/dungeons/HAKAdanCH - xml_path: assets/xml/scenes/dungeons/HAKAdanCH_mq.xml -- name: scenes/dungeons/HIDAN - xml_path: assets/xml/scenes/dungeons/HIDAN_mq.xml -- name: scenes/dungeons/ice_doukutu - xml_path: assets/xml/scenes/dungeons/ice_doukutu_mq.xml -- name: scenes/dungeons/jyasinboss - xml_path: assets/xml/scenes/dungeons/jyasinboss.xml -- name: scenes/dungeons/jyasinzou - xml_path: assets/xml/scenes/dungeons/jyasinzou_mq.xml -- name: scenes/dungeons/men - xml_path: assets/xml/scenes/dungeons/men_mq.xml -- name: scenes/dungeons/MIZUsin - xml_path: assets/xml/scenes/dungeons/MIZUsin_mq.xml -- name: scenes/dungeons/MIZUsin_bs - xml_path: assets/xml/scenes/dungeons/MIZUsin_bs.xml -- name: scenes/dungeons/moribossroom - xml_path: assets/xml/scenes/dungeons/moribossroom.xml -- name: scenes/dungeons/ydan - xml_path: assets/xml/scenes/dungeons/ydan_mq.xml -- name: scenes/dungeons/ydan_boss - xml_path: assets/xml/scenes/dungeons/ydan_boss.xml -- name: scenes/indoors/bowling - xml_path: assets/xml/scenes/indoors/bowling.xml -- name: scenes/indoors/daiyousei_izumi - xml_path: assets/xml/scenes/indoors/daiyousei_izumi.xml -- name: scenes/indoors/hairal_niwa - xml_path: assets/xml/scenes/indoors/hairal_niwa.xml -- name: scenes/indoors/hairal_niwa2 - xml_path: assets/xml/scenes/indoors/hairal_niwa2.xml -- name: scenes/indoors/hairal_niwa_n - xml_path: assets/xml/scenes/indoors/hairal_niwa_n.xml -- name: scenes/indoors/hakasitarelay - xml_path: assets/xml/scenes/indoors/hakasitarelay.xml -- name: scenes/indoors/hut - xml_path: assets/xml/scenes/indoors/hut.xml -- name: scenes/indoors/hylia_labo - xml_path: assets/xml/scenes/indoors/hylia_labo.xml -- name: scenes/indoors/impa - xml_path: assets/xml/scenes/indoors/impa.xml -- name: scenes/indoors/kakariko - xml_path: assets/xml/scenes/indoors/kakariko.xml -- name: scenes/indoors/kenjyanoma - xml_path: assets/xml/scenes/indoors/kenjyanoma.xml -- name: scenes/indoors/kokiri_home - xml_path: assets/xml/scenes/indoors/kokiri_home.xml -- name: scenes/indoors/kokiri_home3 - xml_path: assets/xml/scenes/indoors/kokiri_home3.xml -- name: scenes/indoors/kokiri_home4 - xml_path: assets/xml/scenes/indoors/kokiri_home4.xml -- name: scenes/indoors/kokiri_home5 - xml_path: assets/xml/scenes/indoors/kokiri_home5.xml -- name: scenes/indoors/labo - xml_path: assets/xml/scenes/indoors/labo.xml -- name: scenes/indoors/link_home - xml_path: assets/xml/scenes/indoors/link_home.xml -- name: scenes/indoors/mahouya - xml_path: assets/xml/scenes/indoors/mahouya.xml -- name: scenes/indoors/malon_stable - xml_path: assets/xml/scenes/indoors/malon_stable.xml -- name: scenes/indoors/miharigoya - xml_path: assets/xml/scenes/indoors/miharigoya.xml -- name: scenes/indoors/nakaniwa - xml_path: assets/xml/scenes/indoors/nakaniwa.xml -- name: scenes/indoors/souko - xml_path: assets/xml/scenes/indoors/souko.xml -- name: scenes/indoors/syatekijyou - xml_path: assets/xml/scenes/indoors/syatekijyou.xml -- name: scenes/indoors/takaraya - xml_path: assets/xml/scenes/indoors/takaraya.xml -- name: scenes/indoors/tent - xml_path: assets/xml/scenes/indoors/tent.xml -- name: scenes/indoors/tokinoma - xml_path: assets/xml/scenes/indoors/tokinoma.xml -- name: scenes/indoors/yousei_izumi_tate - xml_path: assets/xml/scenes/indoors/yousei_izumi_tate.xml -- name: scenes/indoors/yousei_izumi_yoko - xml_path: assets/xml/scenes/indoors/yousei_izumi_yoko.xml -- name: scenes/misc/enrui - xml_path: assets/xml/scenes/misc/enrui.xml -- name: scenes/misc/entra - xml_path: assets/xml/scenes/misc/entra.xml -- name: scenes/misc/entra_n - xml_path: assets/xml/scenes/misc/entra_n.xml -- name: scenes/misc/hakaana - xml_path: assets/xml/scenes/misc/hakaana.xml -- name: scenes/misc/hakaana2 - xml_path: assets/xml/scenes/misc/hakaana2.xml -- name: scenes/misc/hakaana_ouke - xml_path: assets/xml/scenes/misc/hakaana_ouke.xml -- name: scenes/misc/hiral_demo - xml_path: assets/xml/scenes/misc/hiral_demo.xml -- name: scenes/misc/kakariko3 - xml_path: assets/xml/scenes/misc/kakariko3.xml -- name: scenes/misc/kakusiana - xml_path: assets/xml/scenes/misc/kakusiana.xml -- name: scenes/misc/kinsuta - xml_path: assets/xml/scenes/misc/kinsuta.xml -- name: scenes/misc/market_alley - xml_path: assets/xml/scenes/misc/market_alley.xml -- name: scenes/misc/market_alley_n - xml_path: assets/xml/scenes/misc/market_alley_n.xml -- name: scenes/misc/market_day - xml_path: assets/xml/scenes/misc/market_day.xml -- name: scenes/misc/market_night - xml_path: assets/xml/scenes/misc/market_night.xml -- name: scenes/misc/market_ruins - xml_path: assets/xml/scenes/misc/market_ruins.xml -- name: scenes/misc/shrine - xml_path: assets/xml/scenes/misc/shrine.xml -- name: scenes/misc/shrine_n - xml_path: assets/xml/scenes/misc/shrine_n.xml -- name: scenes/misc/shrine_r - xml_path: assets/xml/scenes/misc/shrine_r.xml -- name: scenes/misc/turibori - xml_path: assets/xml/scenes/misc/turibori.xml -- name: scenes/overworld/ganon_tou - xml_path: assets/xml/scenes/overworld/ganon_tou.xml -- name: scenes/overworld/spot00 - xml_path: assets/xml/scenes/overworld/spot00.xml -- name: scenes/overworld/spot01 - xml_path: assets/xml/scenes/overworld/spot01.xml -- name: scenes/overworld/spot02 - xml_path: assets/xml/scenes/overworld/spot02.xml -- name: scenes/overworld/spot03 - xml_path: assets/xml/scenes/overworld/spot03.xml -- name: scenes/overworld/spot04 - xml_path: assets/xml/scenes/overworld/spot04.xml -- name: scenes/overworld/spot05 - xml_path: assets/xml/scenes/overworld/spot05.xml -- name: scenes/overworld/spot06 - xml_path: assets/xml/scenes/overworld/spot06.xml -- name: scenes/overworld/spot07 - xml_path: assets/xml/scenes/overworld/spot07.xml -- name: scenes/overworld/spot08 - xml_path: assets/xml/scenes/overworld/spot08.xml -- name: scenes/overworld/spot09 - xml_path: assets/xml/scenes/overworld/spot09.xml -- name: scenes/overworld/spot10 - xml_path: assets/xml/scenes/overworld/spot10.xml -- name: scenes/overworld/spot11 - xml_path: assets/xml/scenes/overworld/spot11.xml -- name: scenes/overworld/spot12 - xml_path: assets/xml/scenes/overworld/spot12.xml -- name: scenes/overworld/spot13 - xml_path: assets/xml/scenes/overworld/spot13.xml -- name: scenes/overworld/spot15 - xml_path: assets/xml/scenes/overworld/spot15.xml -- name: scenes/overworld/spot16 - xml_path: assets/xml/scenes/overworld/spot16_v2.xml -- name: scenes/overworld/spot17 - xml_path: assets/xml/scenes/overworld/spot17.xml -- name: scenes/overworld/spot18 - xml_path: assets/xml/scenes/overworld/spot18.xml -- name: scenes/overworld/spot20 - xml_path: assets/xml/scenes/overworld/spot20_pal.xml -- name: scenes/shops/alley_shop - xml_path: assets/xml/scenes/shops/alley_shop.xml -- name: scenes/shops/drag - xml_path: assets/xml/scenes/shops/drag.xml -- name: scenes/shops/face_shop - xml_path: assets/xml/scenes/shops/face_shop.xml -- name: scenes/shops/golon - xml_path: assets/xml/scenes/shops/golon.xml -- name: scenes/shops/kokiri_shop - xml_path: assets/xml/scenes/shops/kokiri_shop.xml -- name: scenes/shops/night_shop - xml_path: assets/xml/scenes/shops/night_shop.xml -- name: scenes/shops/shop1 - xml_path: assets/xml/scenes/shops/shop1.xml -- name: scenes/shops/zoora - xml_path: assets/xml/scenes/shops/zoora.xml -- name: scenes/test_levels/besitu - xml_path: assets/xml/scenes/test_levels/besitu.xml -- name: scenes/test_levels/depth_test - xml_path: assets/xml/scenes/test_levels/depth_test.xml -- name: scenes/test_levels/sasatest - xml_path: assets/xml/scenes/test_levels/sasatest.xml -- name: scenes/test_levels/sutaru - xml_path: assets/xml/scenes/test_levels/sutaru.xml -- name: scenes/test_levels/syotes - xml_path: assets/xml/scenes/test_levels/syotes.xml -- name: scenes/test_levels/syotes2 - xml_path: assets/xml/scenes/test_levels/syotes2.xml -- name: scenes/test_levels/test01 - xml_path: assets/xml/scenes/test_levels/test01.xml -- name: scenes/test_levels/testroom - xml_path: assets/xml/scenes/test_levels/testroom.xml -- name: textures/backgrounds - xml_path: assets/xml/textures/backgrounds.xml -- name: textures/do_action_static - xml_path: assets/xml/textures/do_action_static_pal.xml -- name: textures/icon_item_24_static - xml_path: assets/xml/textures/icon_item_24_static.xml -- name: textures/icon_item_dungeon_static - xml_path: assets/xml/textures/icon_item_dungeon_static.xml -- name: textures/icon_item_field_static - xml_path: assets/xml/textures/icon_item_field_static.xml -- name: textures/icon_item_fra_static - xml_path: assets/xml/textures/icon_item_fra_static.xml -- name: textures/icon_item_gameover_static - xml_path: assets/xml/textures/icon_item_gameover_static_pal.xml -- name: textures/icon_item_ger_static - xml_path: assets/xml/textures/icon_item_ger_static.xml -- name: textures/icon_item_nes_static - xml_path: assets/xml/textures/icon_item_nes_static.xml -- name: textures/icon_item_static - xml_path: assets/xml/textures/icon_item_static_pal.xml -- name: textures/item_name_static - xml_path: assets/xml/textures/item_name_static_pal.xml -- name: textures/map_48x85_static - xml_path: assets/xml/textures/map_48x85_static.xml -- name: textures/map_grand_static - xml_path: assets/xml/textures/map_grand_static.xml -- name: textures/map_i_static - xml_path: assets/xml/textures/map_i_static.xml -- name: textures/map_name_static - xml_path: assets/xml/textures/map_name_static_pal.xml -- name: textures/message_static - xml_path: assets/xml/textures/message_static.xml -- name: textures/message_texture_static - xml_path: assets/xml/textures/message_texture_static.xml -- name: textures/nes_font_static - xml_path: assets/xml/textures/nes_font_static_v2.xml -- name: textures/nintendo_rogo_static - xml_path: assets/xml/textures/nintendo_rogo_static_v2.xml -- name: textures/parameter_static - xml_path: assets/xml/textures/parameter_static.xml -- name: textures/place_title_cards - xml_path: assets/xml/textures/place_title_cards_pal.xml -- name: textures/skyboxes - xml_path: assets/xml/textures/skyboxes.xml -- name: textures/title_static - xml_path: assets/xml/textures/title_static_pal_gc.xml diff --git a/baseroms/hackeroot-mq/segments.csv b/baseroms/hackeroot-mq/segments.csv deleted file mode 100644 index 9bbba167b..000000000 --- a/baseroms/hackeroot-mq/segments.csv +++ /dev/null @@ -1,1533 +0,0 @@ -Name,VRAM start -makerom,80000000 -boot,80000460 -dmadata, -Audiobank, -Audioseq, -Audiotable, -link_animetion, -icon_item_static, -icon_item_24_static, -icon_item_field_static, -icon_item_dungeon_static, -icon_item_gameover_static, -icon_item_nes_static, -icon_item_ger_static, -icon_item_fra_static, -item_name_static, -map_name_static, -do_action_static, -message_static, -message_texture_static, -nes_font_static, -nes_message_data_static, -ger_message_data_static, -fra_message_data_static, -staff_message_data_static, -map_grand_static, -map_i_static, -map_48x85_static, -code,8001CE60 -ovl_title,80800000 -ovl_select,80800B90 -ovl_opening,80803BF0 -ovl_file_choose,80803D40 -ovl_kaleido_scope,80813820 -ovl_player_actor,80832210 -ovl_map_mark_data,80858B70 -ovl_En_Test,8085F650 -ovl_Arms_Hook,80864F00 -ovl_Arrow_Fire,80865D10 -ovl_Arrow_Ice,80867CD0 -ovl_Arrow_Light,80869CB0 -ovl_Bg_Bdan_Objects,8086BCA0 -ovl_Bg_Bdan_Switch,8086D010 -ovl_Bg_Bom_Guard,8086E550 -ovl_Bg_Bombwall,8086E7D0 -ovl_Bg_Bowl_Wall,8086F160 -ovl_Bg_Breakwall,8086FBE0 -ovl_Bg_Ddan_Jd,80870AB0 -ovl_Bg_Ddan_Kd,808710F0 -ovl_Bg_Dodoago,80871A00 -ovl_Bg_Dy_Yoseizo,80872830 -ovl_Bg_Ganon_Otyuka,80875920 -ovl_Bg_Gate_Shutter,80878160 -ovl_Bg_Gjyo_Bridge,808786C0 -ovl_Bg_Gnd_Darkmeiro,80878C30 -ovl_Bg_Gnd_Firemeiro,808794C0 -ovl_Bg_Gnd_Iceblock,80879AA0 -ovl_Bg_Gnd_Nisekabe,8087AC50 -ovl_Bg_Gnd_Soulmeiro,8087ADC0 -ovl_Bg_Haka,8087B6B0 -ovl_Bg_Haka_Gate,8087BDF0 -ovl_Bg_Haka_Huta,8087CFC0 -ovl_Bg_Haka_Megane,8087DA40 -ovl_Bg_Haka_MeganeBG,8087DE30 -ovl_Bg_Haka_Sgami,8087E4E0 -ovl_Bg_Haka_Ship,8087F100 -ovl_Bg_Haka_Trap,8087FCA0 -ovl_Bg_Haka_Tubo,80881250 -ovl_Bg_Haka_Water,80881D00 -ovl_Bg_Haka_Zou,808825C0 -ovl_Bg_Heavy_Block,80883790 -ovl_Bg_Hidan_Curtain,808851A0 -ovl_Bg_Hidan_Dalm,80885E20 -ovl_Bg_Hidan_Firewall,80886660 -ovl_Bg_Hidan_Fslift,80886E40 -ovl_Bg_Hidan_Fwbig,808872F0 -ovl_Bg_Hidan_Hamstep,80888040 -ovl_Bg_Hidan_Hrock,80889130 -ovl_Bg_Hidan_Kousi,80889960 -ovl_Bg_Hidan_Kowarerukabe,8088A020 -ovl_Bg_Hidan_Rock,8088B080 -ovl_Bg_Hidan_Rsekizou,8088C200 -ovl_Bg_Hidan_Sekizou,8088CEC0 -ovl_Bg_Hidan_Sima,8088E3D0 -ovl_Bg_Hidan_Syoku,8088F3C0 -ovl_Bg_Ice_Objects,8088F810 -ovl_Bg_Ice_Shelter,80890740 -ovl_Bg_Ice_Shutter,80891AC0 -ovl_Bg_Ice_Turara,80891F20 -ovl_Bg_Ingate,80892740 -ovl_Bg_Jya_1flift,80892B60 -ovl_Bg_Jya_Amishutter,808932C0 -ovl_Bg_Jya_Bigmirror,808936E0 -ovl_Bg_Jya_Block,808941A0 -ovl_Bg_Jya_Bombchuiwa,808944A0 -ovl_Bg_Jya_Bombiwa,808951A0 -ovl_Bg_Jya_Cobra,808958F0 -ovl_Bg_Jya_Goroiwa,80897970 -ovl_Bg_Jya_Haheniron,808980C0 -ovl_Bg_Jya_Ironobj,808988A0 -ovl_Bg_Jya_Kanaami,80899740 -ovl_Bg_Jya_Lift,80899BA0 -ovl_Bg_Jya_Megami,8089A130 -ovl_Bg_Jya_Zurerukabe,8089B440 -ovl_Bg_Menkuri_Eye,8089BC70 -ovl_Bg_Menkuri_Kaiten,8089C1B0 -ovl_Bg_Menkuri_Nisekabe,8089C330 -ovl_Bg_Mizu_Bwall,8089C480 -ovl_Bg_Mizu_Movebg,8089DC30 -ovl_Bg_Mizu_Shutter,8089EE50 -ovl_Bg_Mizu_Uzu,8089F6E0 -ovl_Bg_Mizu_Water,8089F8B0 -ovl_Bg_Mjin,808A0780 -ovl_Bg_Mori_Bigst,808A0BC0 -ovl_Bg_Mori_Elevator,808A1800 -ovl_Bg_Mori_Hashigo,808A2560 -ovl_Bg_Mori_Hashira4,808A3060 -ovl_Bg_Mori_Hineri,808A37D0 -ovl_Bg_Mori_Idomizu,808A4640 -ovl_Bg_Mori_Kaitenkabe,808A4DC0 -ovl_Bg_Mori_Rakkatenjo,808A5570 -ovl_Bg_Po_Event,808A6210 -ovl_Bg_Po_Syokudai,808A80B0 -ovl_Bg_Pushbox,808A8AE0 -ovl_Bg_Relay_Objects,808A8E50 -ovl_Bg_Spot00_Break,808A95E0 -ovl_Bg_Spot00_Hanebasi,808A9780 -ovl_Bg_Spot01_Fusya,808AA9C0 -ovl_Bg_Spot01_Idohashira,808AACE0 -ovl_Bg_Spot01_Idomizu,808ABAE0 -ovl_Bg_Spot01_Idosoko,808ABE80 -ovl_Bg_Spot01_Objects2,808AC140 -ovl_Bg_Spot02_Objects,808AC660 -ovl_Bg_Spot03_Taki,808ADAE0 -ovl_Bg_Spot05_Soko,808AE470 -ovl_Bg_Spot06_Objects,808AE780 -ovl_Bg_Spot07_Taki,808AFC30 -ovl_Bg_Spot08_Bakudankabe,808B02D0 -ovl_Bg_Spot08_Iceblock,808B0960 -ovl_Bg_Spot09_Obj,808B1AE0 -ovl_Bg_Spot11_Bakudankabe,808B2180 -ovl_Bg_Spot11_Oasis,808B27F0 -ovl_Bg_Spot12_Gate,808B2F90 -ovl_Bg_Spot12_Saku,808B3420 -ovl_Bg_Spot15_Rrbox,808B3960 -ovl_Bg_Spot15_Saku,808B4850 -ovl_Bg_Spot16_Bombstone,808B4C30 -ovl_Bg_Spot16_Doughnut,808B6440 -ovl_Bg_Spot17_Bakudankabe,808B6BC0 -ovl_Bg_Spot17_Funen,808B7400 -ovl_Bg_Spot18_Basket,808B7710 -ovl_Bg_Spot18_Futa,808B8780 -ovl_Bg_Spot18_Obj,808B8910 -ovl_Bg_Spot18_Shutter,808B93D0 -ovl_Bg_Sst_Floor,808B9910 -ovl_Bg_Toki_Hikari,808B9F00 -ovl_Bg_Toki_Swd,808BAE40 -ovl_Bg_Treemouth,808BC500 -ovl_Bg_Umajump,808BDBE0 -ovl_Bg_Vb_Sima,808BDD60 -ovl_Bg_Ydan_Hasi,808BE500 -ovl_Bg_Ydan_Maruta,808BED40 -ovl_Bg_Ydan_Sp,808BF410 -ovl_Bg_Zg,808C0C20 -ovl_Boss_Dodongo,808C1190 -ovl_Boss_Fd,808CADC0 -ovl_Boss_Fd2,808D2670 -ovl_Boss_Ganon,808D6870 -ovl_Boss_Ganon2,808FCF40 -ovl_Boss_Ganondrof,80910640 -ovl_Boss_Goma,80915A10 -ovl_Boss_Mo,8091BB00 -ovl_Boss_Sst,8092C5D0 -ovl_Boss_Tw,80938CD0 -ovl_Boss_Va,8094F2C0 -ovl_Demo_6K,80966950 -ovl_Demo_Du,80969AD0 -ovl_Demo_Ec,8096D4B0 -ovl_Demo_Effect,80970F50 -ovl_Demo_Ext,80977390 -ovl_Demo_Geff,80977E40 -ovl_Demo_Gj,80978930 -ovl_Demo_Go,8097C870 -ovl_Demo_Gt,8097D670 -ovl_Demo_Ik,80983300 -ovl_Demo_Im,80984BE0 -ovl_Demo_Kankyo,80988E80 -ovl_Demo_Kekkai,8098CFD0 -ovl_Demo_Sa,8098E460 -ovl_Demo_Shd,80991230 -ovl_Demo_Tre_Lgt,809936C0 -ovl_Door_Ana,80993EF0 -ovl_Door_Gerudo,809945E0 -ovl_Door_Killer,80994C50 -ovl_Door_Shutter,809962A0 -ovl_Door_Toki,80998620 -ovl_Door_Warp1,80998780 -ovl_Efc_Erupc,8099CCB0 -ovl_Eff_Dust,8099D8D0 -ovl_Effect_Ss_Blast,8099EDB0 -ovl_Effect_Ss_Bomb,8099F1B0 -ovl_Effect_Ss_Bomb2,8099F650 -ovl_Effect_Ss_Bubble,809A0040 -ovl_Effect_Ss_D_Fire,809A0550 -ovl_Effect_Ss_Dead_Db,809A0AA0 -ovl_Effect_Ss_Dead_Dd,809A0FE0 -ovl_Effect_Ss_Dead_Ds,809A1610 -ovl_Effect_Ss_Dead_Sound,809A1B30 -ovl_Effect_Ss_Dt_Bubble,809A1CB0 -ovl_Effect_Ss_Dust,809A22D0 -ovl_Effect_Ss_En_Fire,809A2B60 -ovl_Effect_Ss_En_Ice,809A3330 -ovl_Effect_Ss_Extra,809A3CC0 -ovl_Effect_Ss_Fcircle,809A4120 -ovl_Effect_Ss_Fhg_Flash,809A4660 -ovl_Effect_Ss_Fire_Tail,809A5740 -ovl_Effect_Ss_G_Fire,809A5ED0 -ovl_Effect_Ss_G_Magma,809A6150 -ovl_Effect_Ss_G_Magma2,809A63A0 -ovl_Effect_Ss_G_Ripple,809A6960 -ovl_Effect_Ss_G_Spk,809A6F30 -ovl_Effect_Ss_G_Splash,809A7540 -ovl_Effect_Ss_Hahen,809A79F0 -ovl_Effect_Ss_HitMark,809A8150 -ovl_Effect_Ss_Ice_Piece,809A8700 -ovl_Effect_Ss_Ice_Smoke,809A8BF0 -ovl_Effect_Ss_K_Fire,809A91B0 -ovl_Effect_Ss_Kakera,809A9680 -ovl_Effect_Ss_KiraKira,809AA810 -ovl_Effect_Ss_Lightning,809AAEF0 -ovl_Effect_Ss_Sibuki,809AB630 -ovl_Effect_Ss_Sibuki2,809ABD60 -ovl_Effect_Ss_Solder_Srch_Ball,809AC130 -ovl_Effect_Ss_Stick,809AC2D0 -ovl_Effect_Ss_Stone1,809AC700 -ovl_Elf_Msg,809ACB20 -ovl_Elf_Msg2,809AD700 -ovl_En_Am,809ADF20 -ovl_En_Ani,809B0370 -ovl_En_Anubice,809B1120 -ovl_En_Anubice_Fire,809B25A0 -ovl_En_Anubice_Tag,809B3400 -ovl_En_Arow_Trap,809B37D0 -ovl_En_Arrow,809B3920 -ovl_En_Attack_Niw,809B5100 -ovl_En_Ba,809B6350 -ovl_En_Bb,809B82E0 -ovl_En_Bdfire,809BC030 -ovl_En_Bigokuta,809BCC60 -ovl_En_Bili,809BF8A0 -ovl_En_Bird,809C1BB0 -ovl_En_Blkobj,809C2060 -ovl_En_Bom,809C26D0 -ovl_En_Bom_Bowl_Man,809C3630 -ovl_En_Bom_Bowl_Pit,809C4E40 -ovl_En_Bom_Chu,809C5830 -ovl_En_Bombf,809C6F60 -ovl_En_Boom,809C8480 -ovl_En_Box,809C8DC0 -ovl_En_Brob,809CAB10 -ovl_En_Bubble,809CBC00 -ovl_En_Butte,809CD070 -ovl_En_Bw,809CE6E0 -ovl_En_Bx,809D1AE0 -ovl_En_Changer,809D2690 -ovl_En_Clear_Tag,809D35B0 -ovl_En_Cow,809DEE00 -ovl_En_Crow,809E0240 -ovl_En_Cs,809E18B0 -ovl_En_Daiku,809E2B30 -ovl_En_Daiku_Kakariko,809E4320 -ovl_En_Dekubaba,809E57D0 -ovl_En_Dekunuts,809E9560 -ovl_En_Dh,809EAD40 -ovl_En_Dha,809EC880 -ovl_En_Diving_Game,809ED870 -ovl_En_Dns,809EF350 -ovl_En_Dnt_Demo,809F08E0 -ovl_En_Dnt_Jiji,809F1AE0 -ovl_En_Dnt_Nomal,809F32C0 -ovl_En_Dodojr,809F63C0 -ovl_En_Dodongo,809F8250 -ovl_En_Dog,809FAFD0 -ovl_En_Door,809FC1D0 -ovl_En_Ds,809FD030 -ovl_En_Du,809FDC30 -ovl_En_Dy_Extra,809FF6F0 -ovl_En_Eg,809FFD90 -ovl_En_Eiyer,809FFFA0 -ovl_En_Elf,80A01C30 -ovl_En_Encount1,80A06720 -ovl_En_Encount2,80A07990 -ovl_En_Ex_Item,80A08EA0 -ovl_En_Ex_Ruppy,80A0A410 -ovl_En_Fd,80A0B6C0 -ovl_En_Fd_Fire,80A0E4B0 -ovl_En_Fhg_Fire,80A0F260 -ovl_En_Fire_Rock,80A11C20 -ovl_En_Firefly,80A13070 -ovl_En_Fish,80A15280 -ovl_En_Floormas,80A17510 -ovl_En_Fr,80A1A9A0 -ovl_En_Fu,80A1D810 -ovl_En_Fw,80A1E5A0 -ovl_En_Fz,80A1FDC0 -ovl_En_G_Switch,80A21EC0 -ovl_En_Ganon_Mant,80A23D60 -ovl_En_Ganon_Organ,80A28000 -ovl_En_Gb,80A2F180 -ovl_En_Ge1,80A30970 -ovl_En_Ge2,80A32BD0 -ovl_En_Ge3,80A34620 -ovl_En_GeldB,80A35310 -ovl_En_GirlA,80A3A750 -ovl_En_Gm,80A3D6E0 -ovl_En_Go,80A3E570 -ovl_En_Go2,80A42D30 -ovl_En_Goma,80A48EC0 -ovl_En_Goroiwa,80A4BCA0 -ovl_En_Gs,80A4E320 -ovl_En_Guest,80A50220 -ovl_En_Hata,80A50D50 -ovl_En_Heishi1,80A512D0 -ovl_En_Heishi2,80A52EA0 -ovl_En_Heishi3,80A55640 -ovl_En_Heishi4,80A560D0 -ovl_En_Hintnuts,80A57200 -ovl_En_Holl,80A58C10 -ovl_En_Honotrap,80A59C30 -ovl_En_Horse,80A5B2F0 -ovl_En_Horse_Game_Check,80A67550 -ovl_En_Horse_Ganon,80A68660 -ovl_En_Horse_Link_Child,80A693D0 -ovl_En_Horse_Normal,80A6B250 -ovl_En_Horse_Zelda,80A6D8D0 -ovl_En_Hs,80A6E3A0 -ovl_En_Hs2,80A6EFA0 -ovl_En_Hy,80A6F5B0 -ovl_En_Ice_Hono,80A72FF0 -ovl_En_Ik,80A74310 -ovl_En_In,80A78FB0 -ovl_En_Insect,80A7BE20 -ovl_En_Ishi,80A7E460 -ovl_En_It,80A87680 -ovl_En_Jj,80A87800 -ovl_En_Js,80A88E10 -ovl_En_Jsjutan,80A897A0 -ovl_En_Kakasi,80A8F170 -ovl_En_Kakasi2,80A90010 -ovl_En_Kakasi3,80A90D20 -ovl_En_Kanban,80A91FA0 -ovl_En_Karebaba,80A95350 -ovl_En_Ko,80A96DB0 -ovl_En_Kusa,80A9AFA0 -ovl_En_Kz,80A9C550 -ovl_En_Light,80A9DB40 -ovl_En_Lightbox,80A9E9D0 -ovl_En_M_Fire1,80A9EE40 -ovl_En_M_Thunder,80A9EFE0 -ovl_En_Ma1,80AA0690 -ovl_En_Ma2,80AA19A0 -ovl_En_Ma3,80AA2AA0 -ovl_En_Mag,80AA3B00 -ovl_En_Mb,80AA6050 -ovl_En_Md,80AAA250 -ovl_En_Mk,80AAC900 -ovl_En_Mm,80AAD770 -ovl_En_Mm2,80AAEE50 -ovl_En_Ms,80AAFD20 -ovl_En_Mu,80AB0420 -ovl_En_Nb,80AB0D90 -ovl_En_Niw,80AB5780 -ovl_En_Niw_Girl,80AB8F80 -ovl_En_Niw_Lady,80AB9C40 -ovl_En_Nutsball,80ABBA50 -ovl_En_Nwc,80ABC0E0 -ovl_En_Ny,80ABCBB0 -ovl_En_OE2,80ABE6A0 -ovl_En_Okarina_Effect,80ABE760 -ovl_En_Okarina_Tag,80ABED20 -ovl_En_Okuta,80AC0660 -ovl_En_Ossan,80AC2CA0 -ovl_En_Owl,80AC9F20 -ovl_En_Part,80ACDDD0 -ovl_En_Peehat,80ACF4A0 -ovl_En_Po_Desert,80AD2CB0 -ovl_En_Po_Field,80AD3B00 -ovl_En_Po_Relay,80AD7740 -ovl_En_Po_Sisters,80AD8F90 -ovl_En_Poh,80ADDD50 -ovl_En_Pu_box,80AE20C0 -ovl_En_Rd,80AE2400 -ovl_En_Reeba,80AE4CD0 -ovl_En_River_Sound,80AE6930 -ovl_En_Rl,80AE72B0 -ovl_En_Rr,80AE8440 -ovl_En_Ru1,80AEAC10 -ovl_En_Ru2,80AF2550 -ovl_En_Sa,80AF5560 -ovl_En_Sb,80AF77F0 -ovl_En_Scene_Change,80AF8C70 -ovl_En_Sda,80AF8E20 -ovl_En_Shopnuts,80AFA720 -ovl_En_Si,80AFB690 -ovl_En_Siofuki,80AFBB80 -ovl_En_Skb,80AFC9A0 -ovl_En_Skj,80AFE2B0 -ovl_En_Skjneedle,80B01EB0 -ovl_En_Ssh,80B02270 -ovl_En_St,80B04890 -ovl_En_Sth,80B07540 -ovl_En_Stream,80B0B7A0 -ovl_En_Sw,80B0BDB0 -ovl_En_Syateki_Itm,80B0F6B0 -ovl_En_Syateki_Man,80B10870 -ovl_En_Syateki_Niw,80B118F0 -ovl_En_Ta,80B13AA0 -ovl_En_Takara_Man,80B17560 -ovl_En_Tana,80B17F30 -ovl_En_Tg,80B18360 -ovl_En_Tite,80B18A80 -ovl_En_Tk,80B1B900 -ovl_En_Torch,80B1D890 -ovl_En_Torch2,80B1D980 -ovl_En_Toryo,80B20170 -ovl_En_Tp,80B20DE0 -ovl_En_Tr,80B22CF0 -ovl_En_Trap,80B24660 -ovl_En_Tubo_Trap,80B258F0 -ovl_En_Vali,80B266B0 -ovl_En_Vase,80B28EB0 -ovl_En_Vb_Ball,80B28FA0 -ovl_En_Viewer,80B2A200 -ovl_En_Vm,80B2D460 -ovl_En_Wall_Tubo,80B2EDF0 -ovl_En_Wallmas,80B2F520 -ovl_En_Weather_Tag,80B31020 -ovl_En_Weiyer,80B32290 -ovl_En_Wf,80B33CB0 -ovl_En_Wonder_Item,80B38060 -ovl_En_Wonder_Talk,80B390F0 -ovl_En_Wonder_Talk2,80B39ED0 -ovl_En_Wood02,80B3AF70 -ovl_En_Xc,80B3C1E0 -ovl_En_Yabusame_Mark,80B42DC0 -ovl_En_Yukabyun,80B439C0 -ovl_En_Zf,80B44050 -ovl_En_Zl1,80B4AB40 -ovl_En_Zl2,80B4E990 -ovl_En_Zl3,80B533B0 -ovl_En_Zl4,80B5B7B0 -ovl_En_Zo,80B60220 -ovl_En_fHG,80B629C0 -ovl_End_Title,80B65720 -ovl_Fishing,80B699A0 -ovl_Item_B_Heart,80B85150 -ovl_Item_Etcetera,80B855F0 -ovl_Item_Inbox,80B85FE0 -ovl_Item_Ocarina,80B86130 -ovl_Item_Shield,80B86920 -ovl_Magic_Dark,80B873D0 -ovl_Magic_Fire,80B88D70 -ovl_Magic_Wind,80B8B100 -ovl_Mir_Ray,80B8D050 -ovl_Obj_Bean,80B8EA80 -ovl_Obj_Blockstop,80B91460 -ovl_Obj_Bombiwa,80B915F0 -ovl_Obj_Comb,80B91B60 -ovl_Obj_Dekujr,80B92420 -ovl_Obj_Elevator,80B92B00 -ovl_Obj_Hamishi,80B92F90 -ovl_Obj_Hana,80B93860 -ovl_Obj_Hsblock,80B93B60 -ovl_Obj_Ice_Poly,80B94260 -ovl_Obj_Kibako,80B94CA0 -ovl_Obj_Kibako2,80B959D0 -ovl_Obj_Lift,80B960D0 -ovl_Obj_Lightswitch,80B96BA0 -ovl_Obj_Makekinsuta,80B98270 -ovl_Obj_Makeoshihiki,80B98510 -ovl_Obj_Mure,80B98AA0 -ovl_Obj_Mure2,80B99F40 -ovl_Obj_Mure3,80B9A9D0 -ovl_Obj_Oshihiki,80B9B180 -ovl_Obj_Roomtimer,80B9CFD0 -ovl_Obj_Switch,80B9D210 -ovl_Obj_Syokudai,80B9F2B0 -ovl_Obj_Timeblock,80B9FFA0 -ovl_Obj_Tsubo,80BA0D60 -ovl_Obj_Warp2block,80BA1DF0 -ovl_Object_Kankyo,80BA2AA0 -ovl_Oceff_Spot,80BA6070 -ovl_Oceff_Storm,80BA70E0 -ovl_Oceff_Wipe,80BA8D90 -ovl_Oceff_Wipe2,80BA9BB0 -ovl_Oceff_Wipe3,80BAB3F0 -ovl_Oceff_Wipe4,80BACC10 -ovl_Shot_Sun,80BADCC0 -gameplay_keep, -gameplay_field_keep, -gameplay_dangeon_keep, -gameplay_object_exchange_static, -object_link_boy, -object_link_child, -object_box, -object_human, -object_okuta, -object_poh, -object_wallmaster, -object_dy_obj, -object_firefly, -object_dodongo, -object_fire, -object_niw, -object_tite, -object_reeba, -object_peehat, -object_kingdodongo, -object_horse, -object_zf, -object_goma, -object_zl1, -object_gol, -object_bubble, -object_dodojr, -object_torch2, -object_bl, -object_tp, -object_oA1, -object_st, -object_bw, -object_ei, -object_horse_normal, -object_oB1, -object_o_anime, -object_spot04_objects, -object_ddan_objects, -object_hidan_objects, -object_horse_ganon, -object_oA2, -object_spot00_objects, -object_mb, -object_bombf, -object_sk2, -object_oE1, -object_oE_anime, -object_oE2, -object_ydan_objects, -object_gnd, -object_am, -object_dekubaba, -object_oA3, -object_oA4, -object_oA5, -object_oA6, -object_oA7, -object_jj, -object_oA8, -object_oA9, -object_oB2, -object_oB3, -object_oB4, -object_horse_zelda, -object_opening_demo1, -object_warp1, -object_b_heart, -object_dekunuts, -object_oE3, -object_oE4, -object_menkuri_objects, -object_oE5, -object_oE6, -object_oE7, -object_oE8, -object_oE9, -object_oE10, -object_oE11, -object_oE12, -object_vali, -object_oA10, -object_oA11, -object_mizu_objects, -object_fhg, -object_ossan, -object_mori_hineri1, -object_Bb, -object_toki_objects, -object_yukabyun, -object_zl2, -object_mjin, -object_mjin_flash, -object_mjin_dark, -object_mjin_flame, -object_mjin_ice, -object_mjin_soul, -object_mjin_wind, -object_mjin_oka, -object_haka_objects, -object_spot06_objects, -object_ice_objects, -object_relay_objects, -object_mori_hineri1a, -object_mori_hineri2, -object_mori_hineri2a, -object_mori_objects, -object_mori_tex, -object_spot08_obj, -object_warp2, -object_hata, -object_bird, -object_wood02, -object_lightbox, -object_pu_box, -object_trap, -object_vase, -object_im, -object_ta, -object_tk, -object_xc, -object_vm, -object_bv, -object_hakach_objects, -object_efc_crystal_light, -object_efc_fire_ball, -object_efc_flash, -object_efc_lgt_shower, -object_efc_star_field, -object_god_lgt, -object_light_ring, -object_triforce_spot, -object_medal, -object_bdan_objects, -object_sd, -object_rd, -object_po_sisters, -object_heavy_object, -object_gndd, -object_fd, -object_du, -object_fw, -object_horse_link_child, -object_spot02_objects, -object_haka, -object_ru1, -object_syokudai, -object_fd2, -object_dh, -object_rl, -object_efc_tw, -object_demo_tre_lgt, -object_gi_key, -object_mir_ray, -object_brob, -object_gi_jewel, -object_spot09_obj, -object_spot18_obj, -object_bdoor, -object_spot17_obj, -object_shop_dungen, -object_nb, -object_mo, -object_sb, -object_gi_melody, -object_gi_heart, -object_gi_compass, -object_gi_bosskey, -object_gi_medal, -object_gi_nuts, -object_sa, -object_gi_hearts, -object_gi_arrowcase, -object_gi_bombpouch, -object_in, -object_tr, -object_spot16_obj, -object_oE1s, -object_oE4s, -object_os_anime, -object_gi_bottle, -object_gi_stick, -object_gi_map, -object_oF1d_map, -object_ru2, -object_gi_shield_1, -object_dekujr, -object_gi_magicpot, -object_gi_bomb_1, -object_oF1s, -object_ma2, -object_gi_purse, -object_hni, -object_tw, -object_rr, -object_bxa, -object_anubice, -object_gi_gerudo, -object_gi_arrow, -object_gi_bomb_2, -object_gi_egg, -object_gi_scale, -object_gi_shield_2, -object_gi_hookshot, -object_gi_ocarina, -object_gi_milk, -object_ma1, -object_ganon, -object_sst, -object_ny, -object_fr, -object_gi_pachinko, -object_gi_boomerang, -object_gi_bow, -object_gi_glasses, -object_gi_liquid, -object_ani, -object_demo_6k, -object_gi_shield_3, -object_gi_letter, -object_spot15_obj, -object_jya_obj, -object_gi_clothes, -object_gi_bean, -object_gi_fish, -object_gi_saw, -object_gi_hammer, -object_gi_grass, -object_gi_longsword, -object_spot01_objects, -object_md, -object_km1, -object_kw1, -object_zo, -object_kz, -object_umajump, -object_masterkokiri, -object_masterkokirihead, -object_mastergolon, -object_masterzoora, -object_aob, -object_ik, -object_ahg, -object_cne, -object_gi_niwatori, -object_skj, -object_gi_bottle_letter, -object_bji, -object_bba, -object_gi_ocarina_0, -object_ds, -object_ane, -object_boj, -object_spot03_object, -object_spot07_object, -object_fz, -object_bob, -object_ge1, -object_yabusame_point, -object_gi_boots_2, -object_gi_seed, -object_gnd_magic, -object_d_elevator, -object_d_hsblock, -object_d_lift, -object_mamenoki, -object_goroiwa, -object_toryo, -object_daiku, -object_nwc, -object_blkobj, -object_gm, -object_ms, -object_hs, -object_ingate, -object_lightswitch, -object_kusa, -object_tsubo, -object_gi_gloves, -object_gi_coin, -object_kanban, -object_gjyo_objects, -object_owl, -object_mk, -object_fu, -object_gi_ki_tan_mask, -object_gi_redead_mask, -object_gi_skj_mask, -object_gi_rabit_mask, -object_gi_truth_mask, -object_ganon_objects, -object_siofuki, -object_stream, -object_mm, -object_fa, -object_os, -object_gi_eye_lotion, -object_gi_powder, -object_gi_mushroom, -object_gi_ticketstone, -object_gi_brokensword, -object_js, -object_cs, -object_gi_prescription, -object_gi_bracelet, -object_gi_soldout, -object_gi_frog, -object_mag, -object_door_gerudo, -object_gt, -object_efc_erupc, -object_zl2_anime1, -object_zl2_anime2, -object_gi_golonmask, -object_gi_zoramask, -object_gi_gerudomask, -object_ganon2, -object_ka, -object_ts, -object_zg, -object_gi_hoverboots, -object_gi_m_arrow, -object_ds2, -object_ec, -object_fish, -object_gi_sutaru, -object_gi_goddess, -object_ssh, -object_bigokuta, -object_bg, -object_spot05_objects, -object_spot12_obj, -object_bombiwa, -object_hintnuts, -object_rs, -object_spot00_break, -object_gla, -object_shopnuts, -object_geldb, -object_gr, -object_dog, -object_jya_iron, -object_jya_door, -object_spot01_objects2, -object_spot11_obj, -object_kibako2, -object_dns, -object_dnk, -object_gi_fire, -object_gi_insect, -object_gi_butterfly, -object_gi_ghost, -object_gi_soul, -object_bowl, -object_po_field, -object_demo_kekkai, -object_efc_doughnut, -object_gi_dekupouch, -object_ganon_anime1, -object_ganon_anime2, -object_ganon_anime3, -object_gi_rupy, -object_spot01_matoya, -object_spot01_matoyab, -object_po_composer, -object_mu, -object_wf, -object_skb, -object_gj, -object_geff, -object_haka_door, -object_gs, -object_ps, -object_bwall, -object_crow, -object_cow, -object_cob, -object_gi_sword_1, -object_door_killer, -object_ouke_haka, -object_timeblock, -object_zl4, -g_pn_01, -g_pn_02, -g_pn_03, -g_pn_04, -g_pn_05, -g_pn_06, -g_pn_07, -g_pn_08, -g_pn_09, -g_pn_10, -g_pn_11, -g_pn_12, -g_pn_13, -g_pn_14, -g_pn_15, -g_pn_16, -g_pn_17, -g_pn_18, -g_pn_19, -g_pn_20, -g_pn_21, -g_pn_22, -g_pn_23, -g_pn_24, -g_pn_25, -g_pn_26, -g_pn_27, -g_pn_28, -g_pn_29, -g_pn_30, -g_pn_31, -g_pn_32, -g_pn_33, -g_pn_34, -g_pn_35, -g_pn_36, -g_pn_37, -g_pn_38, -g_pn_39, -g_pn_40, -g_pn_41, -g_pn_42, -g_pn_43, -g_pn_44, -g_pn_45, -g_pn_46, -g_pn_47, -g_pn_48, -g_pn_49, -g_pn_50, -g_pn_51, -g_pn_52, -g_pn_53, -g_pn_54, -g_pn_55, -g_pn_56, -g_pn_57, -z_select_static, -nintendo_rogo_static, -title_static, -parameter_static, -vr_fine0_static, -vr_fine0_pal_static, -vr_fine1_static, -vr_fine1_pal_static, -vr_fine2_static, -vr_fine2_pal_static, -vr_fine3_static, -vr_fine3_pal_static, -vr_cloud0_static, -vr_cloud0_pal_static, -vr_cloud1_static, -vr_cloud1_pal_static, -vr_cloud2_static, -vr_cloud2_pal_static, -vr_cloud3_static, -vr_cloud3_pal_static, -vr_holy0_static, -vr_holy0_pal_static, -vr_holy1_static, -vr_holy1_pal_static, -vr_MDVR_static, -vr_MDVR_pal_static, -vr_MNVR_static, -vr_MNVR_pal_static, -vr_RUVR_static, -vr_RUVR_pal_static, -vr_LHVR_static, -vr_LHVR_pal_static, -vr_KHVR_static, -vr_KHVR_pal_static, -vr_K3VR_static, -vr_K3VR_pal_static, -vr_K4VR_static, -vr_K4VR_pal_static, -vr_K5VR_static, -vr_K5VR_pal_static, -vr_SP1a_static, -vr_SP1a_pal_static, -vr_MLVR_static, -vr_MLVR_pal_static, -vr_KKRVR_static, -vr_KKRVR_pal_static, -vr_KR3VR_static, -vr_KR3VR_pal_static, -vr_IPVR_static, -vr_IPVR_pal_static, -vr_KSVR_static, -vr_KSVR_pal_static, -vr_GLVR_static, -vr_GLVR_pal_static, -vr_ZRVR_static, -vr_ZRVR_pal_static, -vr_DGVR_static, -vr_DGVR_pal_static, -vr_ALVR_static, -vr_ALVR_pal_static, -vr_NSVR_static, -vr_NSVR_pal_static, -vr_LBVR_static, -vr_LBVR_pal_static, -vr_TTVR_static, -vr_TTVR_pal_static, -vr_FCVR_static, -vr_FCVR_pal_static, -elf_message_field, -elf_message_ydan, -syotes_scene, -syotes_room_0, -syotes2_scene, -syotes2_room_0, -depth_test_scene, -depth_test_room_0, -spot00_scene, -spot00_room_0, -spot01_scene, -spot01_room_0, -spot02_scene, -spot02_room_0, -spot02_room_1, -spot03_scene, -spot03_room_0, -spot03_room_1, -spot04_scene, -spot04_room_0, -spot04_room_1, -spot04_room_2, -spot05_scene, -spot05_room_0, -spot06_scene, -spot06_room_0, -spot07_scene, -spot07_room_0, -spot07_room_1, -spot08_scene, -spot08_room_0, -spot09_scene, -spot09_room_0, -spot10_scene, -spot10_room_0, -spot10_room_1, -spot10_room_2, -spot10_room_3, -spot10_room_4, -spot10_room_5, -spot10_room_6, -spot10_room_7, -spot10_room_8, -spot10_room_9, -spot11_scene, -spot11_room_0, -spot12_scene, -spot12_room_0, -spot12_room_1, -spot13_scene, -spot13_room_0, -spot13_room_1, -spot15_scene, -spot15_room_0, -spot16_scene, -spot16_room_0, -spot17_scene, -spot17_room_0, -spot17_room_1, -spot18_scene, -spot18_room_0, -spot18_room_1, -spot18_room_2, -spot18_room_3, -ydan_scene, -ydan_room_0, -ydan_room_1, -ydan_room_2, -ydan_room_3, -ydan_room_4, -ydan_room_5, -ydan_room_6, -ydan_room_7, -ydan_room_8, -ydan_room_9, -ydan_room_10, -ydan_room_11, -ddan_scene, -ddan_room_0, -ddan_room_1, -ddan_room_2, -ddan_room_3, -ddan_room_4, -ddan_room_5, -ddan_room_6, -ddan_room_7, -ddan_room_8, -ddan_room_9, -ddan_room_10, -ddan_room_11, -ddan_room_12, -ddan_room_13, -ddan_room_14, -ddan_room_15, -ddan_room_16, -bdan_scene, -bdan_room_0, -bdan_room_1, -bdan_room_2, -bdan_room_3, -bdan_room_4, -bdan_room_5, -bdan_room_6, -bdan_room_7, -bdan_room_8, -bdan_room_9, -bdan_room_10, -bdan_room_11, -bdan_room_12, -bdan_room_13, -bdan_room_14, -bdan_room_15, -Bmori1_scene, -Bmori1_room_0, -Bmori1_room_1, -Bmori1_room_2, -Bmori1_room_3, -Bmori1_room_4, -Bmori1_room_5, -Bmori1_room_6, -Bmori1_room_7, -Bmori1_room_8, -Bmori1_room_9, -Bmori1_room_10, -Bmori1_room_11, -Bmori1_room_12, -Bmori1_room_13, -Bmori1_room_14, -Bmori1_room_15, -Bmori1_room_16, -Bmori1_room_17, -Bmori1_room_18, -Bmori1_room_19, -Bmori1_room_20, -Bmori1_room_21, -Bmori1_room_22, -HIDAN_scene, -HIDAN_room_0, -HIDAN_room_1, -HIDAN_room_2, -HIDAN_room_3, -HIDAN_room_4, -HIDAN_room_5, -HIDAN_room_6, -HIDAN_room_7, -HIDAN_room_8, -HIDAN_room_9, -HIDAN_room_10, -HIDAN_room_11, -HIDAN_room_12, -HIDAN_room_13, -HIDAN_room_14, -HIDAN_room_15, -HIDAN_room_16, -HIDAN_room_17, -HIDAN_room_18, -HIDAN_room_19, -HIDAN_room_20, -HIDAN_room_21, -HIDAN_room_22, -HIDAN_room_23, -HIDAN_room_24, -HIDAN_room_25, -HIDAN_room_26, -MIZUsin_scene, -MIZUsin_room_0, -MIZUsin_room_1, -MIZUsin_room_2, -MIZUsin_room_3, -MIZUsin_room_4, -MIZUsin_room_5, -MIZUsin_room_6, -MIZUsin_room_7, -MIZUsin_room_8, -MIZUsin_room_9, -MIZUsin_room_10, -MIZUsin_room_11, -MIZUsin_room_12, -MIZUsin_room_13, -MIZUsin_room_14, -MIZUsin_room_15, -MIZUsin_room_16, -MIZUsin_room_17, -MIZUsin_room_18, -MIZUsin_room_19, -MIZUsin_room_20, -MIZUsin_room_21, -MIZUsin_room_22, -jyasinzou_scene, -jyasinzou_room_0, -jyasinzou_room_1, -jyasinzou_room_2, -jyasinzou_room_3, -jyasinzou_room_4, -jyasinzou_room_5, -jyasinzou_room_6, -jyasinzou_room_7, -jyasinzou_room_8, -jyasinzou_room_9, -jyasinzou_room_10, -jyasinzou_room_11, -jyasinzou_room_12, -jyasinzou_room_13, -jyasinzou_room_14, -jyasinzou_room_15, -jyasinzou_room_16, -jyasinzou_room_17, -jyasinzou_room_18, -jyasinzou_room_19, -jyasinzou_room_20, -jyasinzou_room_21, -jyasinzou_room_22, -jyasinzou_room_23, -jyasinzou_room_24, -jyasinzou_room_25, -jyasinzou_room_26, -jyasinzou_room_27, -jyasinzou_room_28, -HAKAdan_scene, -HAKAdan_room_0, -HAKAdan_room_1, -HAKAdan_room_2, -HAKAdan_room_3, -HAKAdan_room_4, -HAKAdan_room_5, -HAKAdan_room_6, -HAKAdan_room_7, -HAKAdan_room_8, -HAKAdan_room_9, -HAKAdan_room_10, -HAKAdan_room_11, -HAKAdan_room_12, -HAKAdan_room_13, -HAKAdan_room_14, -HAKAdan_room_15, -HAKAdan_room_16, -HAKAdan_room_17, -HAKAdan_room_18, -HAKAdan_room_19, -HAKAdan_room_20, -HAKAdan_room_21, -HAKAdan_room_22, -HAKAdanCH_scene, -HAKAdanCH_room_0, -HAKAdanCH_room_1, -HAKAdanCH_room_2, -HAKAdanCH_room_3, -HAKAdanCH_room_4, -HAKAdanCH_room_5, -HAKAdanCH_room_6, -ice_doukutu_scene, -ice_doukutu_room_0, -ice_doukutu_room_1, -ice_doukutu_room_2, -ice_doukutu_room_3, -ice_doukutu_room_4, -ice_doukutu_room_5, -ice_doukutu_room_6, -ice_doukutu_room_7, -ice_doukutu_room_8, -ice_doukutu_room_9, -ice_doukutu_room_10, -ice_doukutu_room_11, -men_scene, -men_room_0, -men_room_1, -men_room_2, -men_room_3, -men_room_4, -men_room_5, -men_room_6, -men_room_7, -men_room_8, -men_room_9, -men_room_10, -ganontika_scene, -ganontika_room_0, -ganontika_room_1, -ganontika_room_2, -ganontika_room_3, -ganontika_room_4, -ganontika_room_5, -ganontika_room_6, -ganontika_room_7, -ganontika_room_8, -ganontika_room_9, -ganontika_room_10, -ganontika_room_11, -ganontika_room_12, -ganontika_room_13, -ganontika_room_14, -ganontika_room_15, -ganontika_room_16, -ganontika_room_17, -ganontika_room_18, -ganontika_room_19, -market_day_scene, -market_day_room_0, -market_night_scene, -market_night_room_0, -testroom_scene, -testroom_room_0, -testroom_room_1, -testroom_room_2, -testroom_room_3, -testroom_room_4, -kenjyanoma_scene, -kenjyanoma_room_0, -tokinoma_scene, -tokinoma_room_0, -tokinoma_room_1, -sutaru_scene, -sutaru_room_0, -link_home_scene, -link_home_room_0, -kokiri_shop_scene, -kokiri_shop_room_0, -kokiri_home_scene, -kokiri_home_room_0, -kakusiana_scene, -kakusiana_room_0, -kakusiana_room_1, -kakusiana_room_2, -kakusiana_room_3, -kakusiana_room_4, -kakusiana_room_5, -kakusiana_room_6, -kakusiana_room_7, -kakusiana_room_8, -kakusiana_room_9, -kakusiana_room_10, -kakusiana_room_11, -kakusiana_room_12, -kakusiana_room_13, -entra_scene, -entra_room_0, -moribossroom_scene, -moribossroom_room_0, -moribossroom_room_1, -syatekijyou_scene, -syatekijyou_room_0, -shop1_scene, -shop1_room_0, -hairal_niwa_scene, -hairal_niwa_room_0, -ganon_tou_scene, -ganon_tou_room_0, -sasatest_scene, -sasatest_room_0, -market_alley_scene, -market_alley_room_0, -spot20_scene, -spot20_room_0, -market_ruins_scene, -market_ruins_room_0, -entra_n_scene, -entra_n_room_0, -enrui_scene, -enrui_room_0, -market_alley_n_scene, -market_alley_n_room_0, -hiral_demo_scene, -hiral_demo_room_0, -kokiri_home3_scene, -kokiri_home3_room_0, -malon_stable_scene, -malon_stable_room_0, -kakariko_scene, -kakariko_room_0, -bdan_boss_scene, -bdan_boss_room_0, -bdan_boss_room_1, -FIRE_bs_scene, -FIRE_bs_room_0, -FIRE_bs_room_1, -hut_scene, -hut_room_0, -daiyousei_izumi_scene, -daiyousei_izumi_room_0, -hakaana_scene, -hakaana_room_0, -yousei_izumi_tate_scene, -yousei_izumi_tate_room_0, -yousei_izumi_yoko_scene, -yousei_izumi_yoko_room_0, -golon_scene, -golon_room_0, -zoora_scene, -zoora_room_0, -drag_scene, -drag_room_0, -alley_shop_scene, -alley_shop_room_0, -night_shop_scene, -night_shop_room_0, -impa_scene, -impa_room_0, -labo_scene, -labo_room_0, -tent_scene, -tent_room_0, -nakaniwa_scene, -nakaniwa_room_0, -ddan_boss_scene, -ddan_boss_room_0, -ddan_boss_room_1, -ydan_boss_scene, -ydan_boss_room_0, -ydan_boss_room_1, -HAKAdan_bs_scene, -HAKAdan_bs_room_0, -HAKAdan_bs_room_1, -MIZUsin_bs_scene, -MIZUsin_bs_room_0, -MIZUsin_bs_room_1, -ganon_scene, -ganon_room_0, -ganon_room_1, -ganon_room_2, -ganon_room_3, -ganon_room_4, -ganon_room_5, -ganon_room_6, -ganon_room_7, -ganon_room_8, -ganon_room_9, -ganon_boss_scene, -ganon_boss_room_0, -jyasinboss_scene, -jyasinboss_room_0, -jyasinboss_room_1, -jyasinboss_room_2, -jyasinboss_room_3, -kokiri_home4_scene, -kokiri_home4_room_0, -kokiri_home5_scene, -kokiri_home5_room_0, -ganon_final_scene, -ganon_final_room_0, -kakariko3_scene, -kakariko3_room_0, -hairal_niwa2_scene, -hairal_niwa2_room_0, -hakasitarelay_scene, -hakasitarelay_room_0, -hakasitarelay_room_1, -hakasitarelay_room_2, -hakasitarelay_room_3, -hakasitarelay_room_4, -hakasitarelay_room_5, -hakasitarelay_room_6, -shrine_scene, -shrine_room_0, -turibori_scene, -turibori_room_0, -shrine_n_scene, -shrine_n_room_0, -shrine_r_scene, -shrine_r_room_0, -hakaana2_scene, -hakaana2_room_0, -gerudoway_scene, -gerudoway_room_0, -gerudoway_room_1, -gerudoway_room_2, -gerudoway_room_3, -gerudoway_room_4, -gerudoway_room_5, -hairal_niwa_n_scene, -hairal_niwa_n_room_0, -bowling_scene, -bowling_room_0, -hakaana_ouke_scene, -hakaana_ouke_room_0, -hakaana_ouke_room_1, -hakaana_ouke_room_2, -hylia_labo_scene, -hylia_labo_room_0, -souko_scene, -souko_room_0, -souko_room_1, -souko_room_2, -miharigoya_scene, -miharigoya_room_0, -mahouya_scene, -mahouya_room_0, -takaraya_scene, -takaraya_room_0, -takaraya_room_1, -takaraya_room_2, -takaraya_room_3, -takaraya_room_4, -takaraya_room_5, -takaraya_room_6, -ganon_sonogo_scene, -ganon_sonogo_room_0, -ganon_sonogo_room_1, -ganon_sonogo_room_2, -ganon_sonogo_room_3, -ganon_sonogo_room_4, -ganon_demo_scene, -ganon_demo_room_0, -besitu_scene, -besitu_room_0, -face_shop_scene, -face_shop_room_0, -kinsuta_scene, -kinsuta_room_0, -ganontikasonogo_scene, -ganontikasonogo_room_0, -ganontikasonogo_room_1, -test01_scene, -test01_room_0, -bump_texture_static, -anime_model_1_static, -anime_model_2_static, -anime_model_3_static, -anime_model_4_static, -anime_model_5_static, -anime_model_6_static, -anime_texture_1_static, -anime_texture_2_static, -anime_texture_3_static, -anime_texture_4_static, -anime_texture_5_static, -anime_texture_6_static, -softsprite_matrix_static, diff --git a/baseroms/ique-cn/checksum-compressed.md5 b/baseroms/ique-cn/checksum-compressed.md5 index ba4e5e57b..6ae15c5d7 100644 --- a/baseroms/ique-cn/checksum-compressed.md5 +++ b/baseroms/ique-cn/checksum-compressed.md5 @@ -1 +1 @@ -0ab48b2d44a74b3bb2d384f6170c2742 build/ique-cn/oot-ique-cn-compressed.z64 +0ab48b2d44a74b3bb2d384f6170c2742 build/ique-cn/hackeroot-ique-cn-compressed.z64 diff --git a/baseroms/ique-cn/checksum.md5 b/baseroms/ique-cn/checksum.md5 index 6390fc95b..4da7f6666 100644 --- a/baseroms/ique-cn/checksum.md5 +++ b/baseroms/ique-cn/checksum.md5 @@ -1 +1 @@ -0238288a8e7c53b558b818865daf6ef3 build/ique-cn/oot-ique-cn.z64 +0238288a8e7c53b558b818865daf6ef3 build/ique-cn/hackeroot-ique-cn.z64 diff --git a/baseroms/ntsc-1.0/checksum-JP-compressed.md5 b/baseroms/ntsc-1.0/checksum-JP-compressed.md5 index b371d6ee6..38473b157 100644 --- a/baseroms/ntsc-1.0/checksum-JP-compressed.md5 +++ b/baseroms/ntsc-1.0/checksum-JP-compressed.md5 @@ -1 +1 @@ -9f04c8e68534b870f707c247fa4b50fc build/ntsc-1.0/oot-ntsc-1.0-compressed.z64 +9f04c8e68534b870f707c247fa4b50fc build/ntsc-1.0/hackeroot-ntsc-1.0-compressed.z64 diff --git a/baseroms/ntsc-1.0/checksum-JP.md5 b/baseroms/ntsc-1.0/checksum-JP.md5 index 0bdeb74cb..35a6b0949 100644 --- a/baseroms/ntsc-1.0/checksum-JP.md5 +++ b/baseroms/ntsc-1.0/checksum-JP.md5 @@ -1 +1 @@ -963d8ee3bd921f4d3c833b82004a76d2 build/ntsc-1.0/oot-ntsc-1.0.z64 +963d8ee3bd921f4d3c833b82004a76d2 build/ntsc-1.0/hackeroot-ntsc-1.0.z64 diff --git a/baseroms/ntsc-1.0/checksum-US-compressed.md5 b/baseroms/ntsc-1.0/checksum-US-compressed.md5 index 7aa912648..44330b35b 100644 --- a/baseroms/ntsc-1.0/checksum-US-compressed.md5 +++ b/baseroms/ntsc-1.0/checksum-US-compressed.md5 @@ -1 +1 @@ -5bd1fe107bf8106b2ab6650abecd54d6 build/ntsc-1.0/oot-ntsc-1.0-compressed.z64 +5bd1fe107bf8106b2ab6650abecd54d6 build/ntsc-1.0/hackeroot-ntsc-1.0-compressed.z64 diff --git a/baseroms/ntsc-1.0/checksum-US.md5 b/baseroms/ntsc-1.0/checksum-US.md5 index fda12ac58..e222c2a6d 100644 --- a/baseroms/ntsc-1.0/checksum-US.md5 +++ b/baseroms/ntsc-1.0/checksum-US.md5 @@ -1 +1 @@ -6829a16db1a34e8ce989847cd8da8d9a build/ntsc-1.0/oot-ntsc-1.0.z64 +6829a16db1a34e8ce989847cd8da8d9a build/ntsc-1.0/hackeroot-ntsc-1.0.z64 diff --git a/baseroms/ntsc-1.1/checksum-JP-compressed.md5 b/baseroms/ntsc-1.1/checksum-JP-compressed.md5 index f02c9c055..810b90bf1 100644 --- a/baseroms/ntsc-1.1/checksum-JP-compressed.md5 +++ b/baseroms/ntsc-1.1/checksum-JP-compressed.md5 @@ -1 +1 @@ -1bf5f42b98c3e97948f01155f12e2d88 build/ntsc-1.1/oot-ntsc-1.1-compressed.z64 +1bf5f42b98c3e97948f01155f12e2d88 build/ntsc-1.1/hackeroot-ntsc-1.1-compressed.z64 diff --git a/baseroms/ntsc-1.1/checksum-JP.md5 b/baseroms/ntsc-1.1/checksum-JP.md5 index 771035379..39ff20aaf 100644 --- a/baseroms/ntsc-1.1/checksum-JP.md5 +++ b/baseroms/ntsc-1.1/checksum-JP.md5 @@ -1 +1 @@ -8b07c719217cb89334edf481a52ef392 build/ntsc-1.1/oot-ntsc-1.1.z64 +8b07c719217cb89334edf481a52ef392 build/ntsc-1.1/hackeroot-ntsc-1.1.z64 diff --git a/baseroms/ntsc-1.1/checksum-US-compressed.md5 b/baseroms/ntsc-1.1/checksum-US-compressed.md5 index 4d13bee15..b79323415 100644 --- a/baseroms/ntsc-1.1/checksum-US-compressed.md5 +++ b/baseroms/ntsc-1.1/checksum-US-compressed.md5 @@ -1 +1 @@ -721fdcc6f5f34be55c43a807f2a16af4 build/ntsc-1.1/oot-ntsc-1.1-compressed.z64 +721fdcc6f5f34be55c43a807f2a16af4 build/ntsc-1.1/hackeroot-ntsc-1.1-compressed.z64 diff --git a/baseroms/ntsc-1.1/checksum-US.md5 b/baseroms/ntsc-1.1/checksum-US.md5 index df5611fe0..9095345aa 100644 --- a/baseroms/ntsc-1.1/checksum-US.md5 +++ b/baseroms/ntsc-1.1/checksum-US.md5 @@ -1 +1 @@ -a11496a4abcd9f173f2f2a342a6370d2 build/ntsc-1.1/oot-ntsc-1.1.z64 +a11496a4abcd9f173f2f2a342a6370d2 build/ntsc-1.1/hackeroot-ntsc-1.1.z64 diff --git a/baseroms/ntsc-1.2/checksum-JP-compressed.md5 b/baseroms/ntsc-1.2/checksum-JP-compressed.md5 index 66fb4932a..371d7369d 100644 --- a/baseroms/ntsc-1.2/checksum-JP-compressed.md5 +++ b/baseroms/ntsc-1.2/checksum-JP-compressed.md5 @@ -1 +1 @@ -2258052847bdd056c8406a9ef6427f13 build/ntsc-1.2/oot-ntsc-1.2-compressed.z64 +2258052847bdd056c8406a9ef6427f13 build/ntsc-1.2/hackeroot-ntsc-1.2-compressed.z64 diff --git a/baseroms/ntsc-1.2/checksum-JP.md5 b/baseroms/ntsc-1.2/checksum-JP.md5 index 8dec1a19a..f642960f0 100644 --- a/baseroms/ntsc-1.2/checksum-JP.md5 +++ b/baseroms/ntsc-1.2/checksum-JP.md5 @@ -1 +1 @@ -48b3e547359f21bb7e123fb362c1dd4e build/ntsc-1.2/oot-ntsc-1.2.z64 +48b3e547359f21bb7e123fb362c1dd4e build/ntsc-1.2/hackeroot-ntsc-1.2.z64 diff --git a/baseroms/ntsc-1.2/checksum-US-compressed.md5 b/baseroms/ntsc-1.2/checksum-US-compressed.md5 index 001d6babd..553c7e38a 100644 --- a/baseroms/ntsc-1.2/checksum-US-compressed.md5 +++ b/baseroms/ntsc-1.2/checksum-US-compressed.md5 @@ -1 +1 @@ -57a9719ad547c516342e1a15d5c28c3d build/ntsc-1.2/oot-ntsc-1.2-compressed.z64 +57a9719ad547c516342e1a15d5c28c3d build/ntsc-1.2/hackeroot-ntsc-1.2-compressed.z64 diff --git a/baseroms/ntsc-1.2/checksum-US.md5 b/baseroms/ntsc-1.2/checksum-US.md5 index 75c1434d1..c7d4ea69b 100644 --- a/baseroms/ntsc-1.2/checksum-US.md5 +++ b/baseroms/ntsc-1.2/checksum-US.md5 @@ -1 +1 @@ -12fcafeba93992facaf65c2ba00f3089 build/ntsc-1.2/oot-ntsc-1.2.z64 +12fcafeba93992facaf65c2ba00f3089 build/ntsc-1.2/hackeroot-ntsc-1.2.z64 diff --git a/baseroms/pal-1.0/checksum-compressed.md5 b/baseroms/pal-1.0/checksum-compressed.md5 index 0689459f0..124010a57 100644 --- a/baseroms/pal-1.0/checksum-compressed.md5 +++ b/baseroms/pal-1.0/checksum-compressed.md5 @@ -1 +1 @@ -e040de91a74b61e3201db0e2323f768a build/pal-1.0/oot-pal-1.0-compressed.z64 +e040de91a74b61e3201db0e2323f768a build/pal-1.0/hackeroot-pal-1.0-compressed.z64 diff --git a/baseroms/pal-1.0/checksum.md5 b/baseroms/pal-1.0/checksum.md5 index 352e0126b..deab511bf 100644 --- a/baseroms/pal-1.0/checksum.md5 +++ b/baseroms/pal-1.0/checksum.md5 @@ -1 +1 @@ -f7e8dec14a2fbae90aafa838c801310f build/pal-1.0/oot-pal-1.0.z64 +f7e8dec14a2fbae90aafa838c801310f build/pal-1.0/hackeroot-pal-1.0.z64 diff --git a/baseroms/pal-1.1/checksum-compressed.md5 b/baseroms/pal-1.1/checksum-compressed.md5 index ef351b211..c66a9830f 100644 --- a/baseroms/pal-1.1/checksum-compressed.md5 +++ b/baseroms/pal-1.1/checksum-compressed.md5 @@ -1 +1 @@ -d714580dd74c2c033f5e1b6dc0aeac77 build/pal-1.1/oot-pal-1.1-compressed.z64 +d714580dd74c2c033f5e1b6dc0aeac77 build/pal-1.1/hackeroot-pal-1.1-compressed.z64 diff --git a/baseroms/pal-1.1/checksum.md5 b/baseroms/pal-1.1/checksum.md5 index 60671db15..f062ec8b3 100644 --- a/baseroms/pal-1.1/checksum.md5 +++ b/baseroms/pal-1.1/checksum.md5 @@ -1 +1 @@ -fee6fe6e4cc6228aae02e15c40168aa1 build/pal-1.1/oot-pal-1.1.z64 +fee6fe6e4cc6228aae02e15c40168aa1 build/pal-1.1/hackeroot-pal-1.1.z64 diff --git a/data/f3dzex2.rodata.s b/data/f3dzex2.rodata.s index 111acf2ea..b0a9da8f1 100644 --- a/data/f3dzex2.rodata.s +++ b/data/f3dzex2.rodata.s @@ -9,11 +9,9 @@ .balign 16 -#if !PLATFORM_N64 glabel gspF3DZEX2_NoN_PosLight_fifoTextStart .incbin "incbin/gspF3DZEX2_NoN_PosLight_fifoText" glabel gspF3DZEX2_NoN_PosLight_fifoTextEnd -#endif glabel gspF3DZEX2_NoN_PosLight_fifoDataStart .incbin "incbin/gspF3DZEX2_NoN_PosLight_fifoData" diff --git a/docs/c_cpp_properties.json b/docs/c_cpp_properties.json index 276e67bd1..1d7bff04b 100644 --- a/docs/c_cpp_properties.json +++ b/docs/c_cpp_properties.json @@ -1,7 +1,7 @@ { "configurations": [ { - "name": "oot-ntsc-1.2", + "name": "hackeroot-ntsc-1.2", "compilerArgs": [ "-m32" ], @@ -27,7 +27,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-jp", + "name": "hackeroot-gc-jp", "compilerArgs": [ "-m32" ], @@ -55,7 +55,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-jp-mq", + "name": "hackeroot-gc-jp-mq", "compilerArgs": [ "-m32" ], @@ -83,7 +83,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-us", + "name": "hackeroot-gc-us", "compilerArgs": [ "-m32" ], @@ -111,7 +111,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-us-mq", + "name": "hackeroot-gc-us-mq", "compilerArgs": [ "-m32" ], @@ -139,7 +139,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-eu-mq-dbg", + "name": "hackeroot-gc-eu-mq-dbg", "compilerArgs": [ "-m32" ], @@ -167,7 +167,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-eu", + "name": "hackeroot-gc-eu", "compilerArgs": [ "-m32" ], @@ -195,7 +195,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-eu-mq", + "name": "hackeroot-gc-eu-mq", "compilerArgs": [ "-m32" ], @@ -223,7 +223,7 @@ "cStandard": "gnu89" }, { - "name": "oot-gc-jp-ce", + "name": "hackeroot-gc-jp-ce", "compilerArgs": [ "-m32" ], @@ -251,7 +251,7 @@ "cStandard": "gnu89" }, { - "name": "oot-ique-cn", + "name": "hackeroot-ique-cn", "compilerArgs": [ "-m32" ], diff --git a/docs/retail_versions.md b/docs/retail_versions.md index b2f790b26..1761de133 100644 --- a/docs/retail_versions.md +++ b/docs/retail_versions.md @@ -41,7 +41,7 @@ code. In order to keep the code readable, we should try to minimize the amount o ``` where `N` is the number of cores on your machine. This will build into - `build/ntsc-1.2` and produce `build/ntsc-1.2/oot-ntsc-1.2.z64`. + `build/ntsc-1.2` and produce `build/ntsc-1.2/hackeroot-ntsc-1.2.z64`. If you later want to delete all output files, run diff --git a/docs/vscode.md b/docs/vscode.md index b63ab7b8a..533bdc5a0 100644 --- a/docs/vscode.md +++ b/docs/vscode.md @@ -37,7 +37,7 @@ Many of VS Code's other shortcuts can be found on [its getting started page](htt You can create a `.vscode/c_cpp_properties.json` file with `C/C++: Edit Configurations (JSON)` in the command box to customise how IntelliSense reads the repository (stuff like where to look for includes, flags, compiler defines, etc.) to make VSCode's IntelliSense plugin better able to understand the structure of the repository. -Below is a good default one to use for this project's repository, for the oot-gc-eu-mq-dbg version specifically. +Below is a good default one to use for this project's repository, for the gc-eu-mq-dbg version specifically. A more complete `c_cpp_properties.json` with configurations for all supported versions [can be found here](c_cpp_properties.json). @@ -45,7 +45,7 @@ A more complete `c_cpp_properties.json` with configurations for all supported ve { "configurations": [ { - "name": "hackeroot-mq", + "name": "ntsc-1.2", "compilerArgs": [ "-m32" // Removes integer truncation warnings with gbi macros ], @@ -53,14 +53,13 @@ A more complete `c_cpp_properties.json` with configurations for all supported ve "include", "include/libc", "src", - "build/hackeroot-mq", + "build/ntsc-1.2", ".", - "extracted/hackeroot-mq" + "extracted/ntsc-1.2" ], "defines": [ "_LANGUAGE_C", // For gbi.h "ENABLE_HACKEROOT=1", - "RELEASE_ROM=0", "COMPRESS_YAZ=1", // Version-specific "OOT_VERSION=GC_EU_MQ_DBG", @@ -108,7 +107,7 @@ Add the following to (or create) the `.vscode/settings.json` file for VSCode to "name": "Ares GDB (Linux)", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/build/hackeroot-mq/hackeroot-mq.elf", + "program": "${workspaceFolder}/build/ntsc-1.2/hackeroot-ntsc-1.2.elf", "cwd": "${workspaceFolder}", "stopAtEntry": false, "externalConsole": false, diff --git a/format.py b/format.py index 2e72cc6dd..06a05cd3b 100755 --- a/format.py +++ b/format.py @@ -30,7 +30,7 @@ APPLY_OPTS = "--format --style=file" # Compiler options used with Clang-Tidy # Normal warnings are disabled with -Wno-everything to focus only on tidying -INCLUDES = "-Iinclude -Isrc -Ibuild/gc-eu-mq-dbg -I. -Ibuild/hackeroot-mq -I." +INCLUDES = "-Iinclude -Isrc -Ibuild/gc-eu-mq-dbg -Ibuild/ntsc-1.2 -I." DEFINES = "-D_LANGUAGE_C -DNON_MATCHING -DF3DEX_GBI_2 -DBUILD_CREATOR=\"\" -DBUILD_DATE=__DATE__ -DBUILD_TIME=__TIME__" COMPILER_OPTS = f"-fno-builtin -std=gnu90 -m32 -Wno-everything {INCLUDES} {DEFINES}" @@ -173,6 +173,11 @@ def list_files_to_format(): if assets_text_f in files: files.remove(assets_text_f) + # Do not format assets/scenes/example/ files + for file in glob.glob("assets/scenes/example/**/*.c", recursive=True): + if file in files: + files.remove(file) + return files, extra_files diff --git a/include/compression.h b/include/compression.h index ef3a8fcaa..69df4d035 100644 --- a/include/compression.h +++ b/include/compression.h @@ -3,14 +3,19 @@ #include "ultra64.h" #include "z64dma.h" +#include "config.h" +#if COMPRESS_YAZ void* Yaz0_FirstDMA(void); void* Yaz0_NextDMA(u8* curSrcPos); void Yaz0_DecompressImpl(u8* src, u8* dst); - void Yaz0_Decompress(uintptr_t romStart, u8* dst, size_t size); +#elif COMPRESS_GZIP void gzip_decompress(uintptr_t romStart, u8* dst, size_t size); +#elif COMPRESS_LZO void LZO_Decompress(unsigned int pstart, unsigned char* op, unsigned int sz); +#elif COMPRESS_APLIB void Aplib_Decompress(unsigned rom, unsigned char* dst, unsigned compSz); +#endif #endif diff --git a/include/config.h b/include/config.h index 3ea81654b..89a40e529 100644 --- a/include/config.h +++ b/include/config.h @@ -2,6 +2,7 @@ #define CONFIG_H #include "libc/stdbool.h" +#include "versions.h" /** * All HackerOoT config headers included into one. diff --git a/include/config/config_safeguards.h b/include/config/config_safeguards.h index 5e9109508..c4058e7f0 100644 --- a/include/config/config_safeguards.h +++ b/include/config/config_safeguards.h @@ -13,21 +13,11 @@ /***************** * config_debug.h */ -#if RELEASE_ROM +#if !DEBUG_FEATURES #undef SKIP_N64_BOOT_LOGO #undef BOOT_TO_SCENE #undef BOOT_TO_SCENE_NEW_GAME_ONLY #undef BOOT_TO_FILE_SELECT - #undef DEBUG_FEATURES - - #define SKIP_N64_BOOT_LOGO false - #define BOOT_TO_SCENE false - #define BOOT_TO_SCENE_NEW_GAME_ONLY false - #define BOOT_TO_FILE_SELECT false - #define DEBUG_FEATURES false -#endif - -#if !DEBUG_FEATURES #undef SHOW_CS_INFOS #undef SHOW_INPUT_DISPLAY #undef SHOW_TIME_INFOS @@ -51,6 +41,10 @@ #undef ENABLE_HACKER_DEBUG #undef ENABLE_PROFILER + #define SKIP_N64_BOOT_LOGO false + #define BOOT_TO_SCENE false + #define BOOT_TO_SCENE_NEW_GAME_ONLY false + #define BOOT_TO_FILE_SELECT false #define SHOW_CS_INFOS false #define SHOW_INPUT_DISPLAY false #define SHOW_TIME_INFOS false @@ -159,58 +153,6 @@ #define ENABLE_F3DEX3 false #endif - -/** - * Default settings if not using HackerOoT mode -*/ -#if !ENABLE_HACKEROOT - #undef SKIP_N64_BOOT_LOGO - #undef BOOT_TO_SCENE - #undef BOOT_TO_SCENE_NEW_GAME_ONLY - #undef BOOT_TO_FILE_SELECT - #undef SHOW_CS_INFOS - #undef SHOW_INPUT_DISPLAY - #undef SHOW_TIME_INFOS - #undef INCLUDE_TEST_SCENES - #undef ENABLE_NO_CLIP - #undef ENABLE_CS_CONTROL - #undef ENABLE_FRAMERATE_OPTIONS - #undef ENABLE_MAP_SELECT - #undef ENABLE_INV_EDITOR - #undef ENABLE_EVENT_EDITOR - #undef ENABLE_REG_EDITOR - #undef ENABLE_CAMERA_DEBUGGER - #undef ENABLE_AUDIO_DEBUGGER - #undef ENABLE_ACTOR_DEBUGGER - #undef ENABLE_MSG_DEBUGGER - #undef ENABLE_DEBUG_SAVE - #undef MAP_SELECT_ON_FILE_1 - #undef ENABLE_MOTION_BLUR_DEBUG - - #define SKIP_N64_BOOT_LOGO true - #define BOOT_TO_SCENE false - #define BOOT_TO_SCENE_NEW_GAME_ONLY false - #define BOOT_TO_FILE_SELECT false - #define SHOW_CS_INFOS false - #define SHOW_INPUT_DISPLAY false - #define SHOW_TIME_INFOS false - #define INCLUDE_TEST_SCENES true - #define ENABLE_NO_CLIP false - #define ENABLE_CS_CONTROL false - #define ENABLE_FRAMERATE_OPTIONS false - #define ENABLE_MAP_SELECT true - #define ENABLE_INV_EDITOR false - #define ENABLE_EVENT_EDITOR false - #define ENABLE_REG_EDITOR false - #define ENABLE_CAMERA_DEBUGGER true - #define ENABLE_AUDIO_DEBUGGER false - #define ENABLE_ACTOR_DEBUGGER false - #define ENABLE_MSG_DEBUGGER false - #define ENABLE_DEBUG_SAVE false - #define MAP_SELECT_ON_FILE_1 true - #define ENABLE_MOTION_BLUR_DEBUG false -#endif - #if ENABLE_PROFILER && !ENABLE_HACKER_DEBUG #error "ENABLE_PROFILER requires ENABLE_HACKER_DEBUG" #endif @@ -218,7 +160,7 @@ /** * Game */ -#define IS_MOTION_BLUR_ENABLED (ENABLE_HACKEROOT && ENABLE_MOTION_BLUR) +#define IS_MOTION_BLUR_ENABLED (ENABLE_MOTION_BLUR) /** * Debug @@ -237,7 +179,7 @@ #define IS_DEBUG_BOOT_ENABLED (DEBUG_FEATURES && ENABLE_DEBUG_BOOT) #define IS_DEBUG_SAVE_ENABLED (DEBUG_FEATURES && ENABLE_DEBUG_SAVE) #define CAN_INCLUDE_TEST_SCENES (DEBUG_ASSETS && INCLUDE_TEST_SCENES) -#define CAN_INCLUDE_EXAMPLE_SCENE (DEBUG_ASSETS && INCLUDE_EXAMPLE_SCENE) +#define CAN_INCLUDE_EXAMPLE_SCENE (DEBUG_FEATURES && INCLUDE_EXAMPLE_SCENE) // In-game editors #define IS_INV_EDITOR_ENABLED (DEBUG_FEATURES && ENABLE_INV_EDITOR) diff --git a/include/save.h b/include/save.h index f2dd4c890..ad3812741 100644 --- a/include/save.h +++ b/include/save.h @@ -12,14 +12,10 @@ typedef enum ZTargetSetting { } ZTargetSetting; typedef enum Language { -#if OOT_NTSC /* 0 */ LANGUAGE_JPN, /* 1 */ LANGUAGE_ENG, -#else - /* 0 */ LANGUAGE_ENG, - /* 1 */ LANGUAGE_GER, - /* 2 */ LANGUAGE_FRA, -#endif + /* 2 */ LANGUAGE_GER, + /* 3 */ LANGUAGE_FRA, /* */ LANGUAGE_MAX } Language; diff --git a/include/thread.h b/include/thread.h index 461dcaf23..e1a94d08a 100644 --- a/include/thread.h +++ b/include/thread.h @@ -10,18 +10,19 @@ #define THREAD_ID_SCHED 5 #define THREAD_ID_PADMGR 7 +#define THREAD_ID_N64DD 8 +#define THREAD_ID_DDMSG 9 +#define THREAD_ID_AUDIOMGR 10 + #if ENABLE_PROFILER -#define THREAD_ID_PIMGR 8 -#define THREAD_ID_VIMGR 9 +#define THREAD_ID_PIMGR 11 +#define THREAD_ID_VIMGR 12 #else // Not sure why these are zero in vanilla. #define THREAD_ID_PIMGR 0 #define THREAD_ID_VIMGR 0 #endif -#define THREAD_ID_N64DD 8 -#define THREAD_ID_DDMSG 9 -#define THREAD_ID_AUDIOMGR 10 #define THREAD_ID_DMAMGR 18 #define THREAD_ID_IRQMGR 19 diff --git a/include/ultra64/gbi.f3dex3.h b/include/ultra64/gbi.f3dex3.h index faa4f0921..f5f3c99c6 100644 --- a/include/ultra64/gbi.f3dex3.h +++ b/include/ultra64/gbi.f3dex3.h @@ -1,12 +1,32 @@ -/* Modded GBI for use with F3DEX3 custom microcode. */ +/** + * @file gbi.h + * @brief Modded GBI for use with F3DEX3 custom microcode + */ -#include "mbi.h" +/* List of options; the documentation for each is where it is used below. */ +/* #define REQUIRE_SEMICOLONS_AFTER_GBI_COMMANDS */ /* recommended */ +/* #define NO_SYNCS_IN_TEXTURE_LOADS */ /* see documentation */ +/* #define F3DEX2_SEGMENTS */ /* see documentation */ +/* #define DISABLE_AA */ /* developer taste */ +/* #define RISKY_RDP_SYNCS */ /* see documentation */ +/* #define KAZE_GBI_HACKS */ /* not recommended unless you are Kaze */ + +#include "ultra64/mbi.h" #ifndef GBI_F3DEX3_H #define GBI_F3DEX3_H -#define F3DEX_GBI_2 1 -#define F3DEX_GBI_3 1 +#ifdef F3DEX_GBI_2 +#undef F3DEX_GBI_2 +#endif + +#ifdef F3DEX_GBI_PL +#undef F3DEX_GBI_PL +#endif + +#define F3DEX_GBI_2 1 +#define F3DEX_GBI_PL 1 +#define F3DEX_GBI_3 1 #ifdef REQUIRE_SEMICOLONS_AFTER_GBI_COMMANDS /* OoT style, semicolons required after using macros, cleaner code. If modding @@ -129,7 +149,6 @@ of warnings if you use -Wpedantic. */ #define G_TEXTURE_ENABLE 0x00000000 /* actually 2, but controlled by SPTexture */ #define G_SHADE 0x00000004 #define G_AMBOCCLUSION 0x00000040 -#define G_ATTROFFSET_Z_ENABLE 0x00000080 #define G_ATTROFFSET_ST_ENABLE 0x00000100 #define G_CULL_NEITHER 0x00000000 #define G_CULL_FRONT 0x00000200 @@ -154,11 +173,35 @@ of warnings if you use -Wpedantic. */ #define G_DL_NOPUSH 1 /* See SPMatrix */ +/** + * @brief specifies whether the matrix operation will be performed on the projection or the model view matrix. + * + */ #define G_MTX_MODELVIEW 0x00 /* matrix types */ +/** + * @brief @copybrief G_MTX_MODELVIEW + * + */ #define G_MTX_PROJECTION 0x04 +/** + * @brief concatenates the matrix (m) with the top of the matrix stack. + * + */ #define G_MTX_MUL 0x00 /* concat or load */ +/** + * @brief loads the matrix (m) onto the top of the matrix stack. + * + */ #define G_MTX_LOAD 0x02 +/** + * @brief specifies do not push the matrix stack prior to matrix operations + * + */ #define G_MTX_NOPUSH 0x00 /* push or not */ +/** + * @brief specifies push the matrix stack prior to matrix operations + * + */ #define G_MTX_PUSH 0x01 /* See SPNormalsMode */ @@ -248,10 +291,28 @@ longer a multiple of 8 (DMA word). This was not used in any command anyway. */ #define G_MWO_aLIGHT_10 0x90 #define G_MWO_bLIGHT_10 0x94 +/** + * @brief changes the color of the vertex. The val parameter is interpreted as 4 bytes: red (high byte), green, blue, and alpha (low byte). + * + */ #define G_MWO_POINT_RGBA 0x10 +/** + * @brief changes the S and T values (texture coordinates of the vertex). The high 16 bits of val specify the S coordinate, and the low 16 bits specify the T coordinate. Each coordinate is an S10.5 number. + * + */ #define G_MWO_POINT_ST 0x14 -#define G_MWO_POINT_XYSCREEN 0x18 /* not recommended to use, won't work if */ -#define G_MWO_POINT_ZSCREEN 0x1C /* the tri gets clipped */ +/** + * @brief change the screen coordinates of the vertex. The high 16 bits of val specify the X coordinate and the low 16 bits specify the Y coordinate. Both coordinates are S13.2 numbers with 0,0 being the upper-left of the screen, positive X going right, and positive Y going down. + * + * @deprecated to use, won't work if the tri gets clipped. + */ +#define G_MWO_POINT_XYSCREEN 0x18 +/** + * @brief changes the screen Z coordinate of the vertex. The entire 32-bit val is taken as the new screen Z value. It is a 16.16 number in the range 0x00000000 to 0x03ff0000. + * + * @deprecated to use, won't work if the tri gets clipped. + */ +#define G_MWO_POINT_ZSCREEN 0x1C #define G_MWO_AO_AMBIENT 0x00 #define G_MWO_AO_DIRECTIONAL 0x02 @@ -261,10 +322,9 @@ longer a multiple of 8 (DMA word). This was not used in any command anyway. */ #define G_MWO_FRESNEL_OFFSET 0x0E #define G_MWO_ATTR_OFFSET_S 0x10 #define G_MWO_ATTR_OFFSET_T 0x12 -#define G_MWO_ATTR_OFFSET_Z 0x14 -#define G_MWO_ALPHA_COMPARE_CULL 0x16 -#define G_MWO_NORMALS_MODE 0x18 -#define G_MWO_LAST_MAT_DL_ADDR 0x1A +#define G_MWO_ALPHA_COMPARE_CULL 0x14 +#define G_MWO_NORMALS_MODE 0x16 +#define G_MWO_LAST_MAT_DL_ADDR 0x18 /* * RDP command argument defines @@ -458,40 +518,6 @@ longer a multiple of 8 (DMA word). This was not used in any command anyway. */ #define G_CC_TRILERP TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0 #define G_CC_INTERFERENCE TEXEL0, 0, TEXEL1, 0, TEXEL0, 0, TEXEL1, 0 -/* - * One-cycle color convert operation - */ -#define G_CC_1CYUV2RGB TEXEL0, K4, K5, TEXEL0, 0, 0, 0, SHADE - -/* - * NOTE: YUV2RGB expects TF step1 color conversion to occur in 2nd clock. - * Therefore, CC looks for step1 results in TEXEL1 - */ -#define G_CC_YUV2RGB TEXEL1, K4, K5, TEXEL1, 0, 0, 0, 0 - -/* typical CC cycle 2 modes */ -#define G_CC_PASS2 0, 0, 0, COMBINED, 0, 0, 0, COMBINED -#define G_CC_MODULATEI2 COMBINED, 0, SHADE, 0, 0, 0, 0, SHADE -#define G_CC_MODULATEIA2 COMBINED, 0, SHADE, 0, COMBINED, 0, SHADE, 0 -#define G_CC_MODULATERGB2 G_CC_MODULATEI2 -#define G_CC_MODULATERGBA2 G_CC_MODULATEIA2 -#define G_CC_MODULATEI_PRIM2 COMBINED, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE -#define G_CC_MODULATEIA_PRIM2 COMBINED, 0, PRIMITIVE, 0, COMBINED, 0, PRIMITIVE, 0 -#define G_CC_MODULATERGB_PRIM2 G_CC_MODULATEI_PRIM2 -#define G_CC_MODULATERGBA_PRIM2 G_CC_MODULATEIA_PRIM2 -#define G_CC_DECALRGB2 0, 0, 0, COMBINED, 0, 0, 0, SHADE -/* - * ? -#define G_CC_DECALRGBA2 COMBINED, SHADE, COMBINED_ALPHA, SHADE, 0, 0, 0, SHADE -*/ -#define G_CC_BLENDI2 ENVIRONMENT, SHADE, COMBINED, SHADE, 0, 0, 0, SHADE -#define G_CC_BLENDIA2 ENVIRONMENT, SHADE, COMBINED, SHADE, COMBINED, 0, SHADE, 0 -#define G_CC_CHROMA_KEY2 TEXEL0, CENTER, SCALE, 0, 0, 0, 0, 0 -#define G_CC_HILITERGB2 ENVIRONMENT, COMBINED, TEXEL0, COMBINED, 0, 0, 0, SHADE -#define G_CC_HILITERGBA2 ENVIRONMENT, COMBINED, TEXEL0, COMBINED, ENVIRONMENT, COMBINED, TEXEL0, COMBINED -#define G_CC_HILITERGBDECALA2 ENVIRONMENT, COMBINED, TEXEL0, COMBINED, 0, 0, 0, TEXEL0 -#define G_CC_HILITERGBPASSA2 ENVIRONMENT, COMBINED, TEXEL0, COMBINED, 0, 0, 0, COMBINED - /* * One-cycle color convert operation @@ -614,6 +640,20 @@ longer a multiple of 8 (DMA word). This was not used in any command anyway. */ #define G_ZS_PIXEL (0 << G_MDSFT_ZSRCSEL) #define G_ZS_PRIM (1 << G_MDSFT_ZSRCSEL) +#ifdef DISABLE_AA +/* Disables antialiasing in all preset rendermodes, saving RDP time. Note that +this does NOT disable antialiasing in manually written rendermodes, e.g. +exported from fast64 with advanced options enabled. We can't redefine the real +IM_RD because IM_RD is needed for transparency also, and we can't distinguish +between a manually written rendermode using IM_RD for transparency and one using +it for antialiasing. */ +#define AA_DEF 0 +#define RD_DEF 0 +#else +#define AA_DEF AA_EN +#define RD_DEF IM_RD +#endif + /* G_SETOTHERMODE_L gSetRenderMode */ #define AA_EN 0x0008 #define Z_CMP 0x0010 @@ -631,7 +671,7 @@ longer a multiple of 8 (DMA word). This was not used in any command anyway. */ #define CVG_X_ALPHA 0x1000 #define ALPHA_CVG_SEL 0x2000 #define FORCE_BL 0x4000 -#define TEX_EDGE 0x0000 /* used to be 0x8000 */ +#define TEX_EDGE 0x0000 /* not in HW V2; is 0x8000 in older HW */ #define G_BL_CLR_IN 0 #define G_BL_CLR_MEM 1 @@ -651,148 +691,150 @@ longer a multiple of 8 (DMA word). This was not used in any command anyway. */ (m1a) << 28 | (m1b) << 24 | (m2a) << 20 | (m2b) << 16 #define RM_AA_ZB_OPA_SURF(clk) \ - AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | Z_CMP | Z_UPD | RD_DEF | CVG_DST_CLAMP | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_RA_ZB_OPA_SURF(clk) \ - AA_EN | Z_CMP | Z_UPD | CVG_DST_CLAMP | \ + AA_DEF | Z_CMP | Z_UPD | CVG_DST_CLAMP | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_AA_ZB_XLU_SURF(clk) \ - AA_EN | Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \ + AA_DEF | Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \ FORCE_BL | ZMODE_XLU | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_ZB_OPA_DECAL(clk) \ - AA_EN | Z_CMP | IM_RD | CVG_DST_WRAP | ALPHA_CVG_SEL | \ + AA_DEF | Z_CMP | RD_DEF | CVG_DST_WRAP | ALPHA_CVG_SEL | \ ZMODE_DEC | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_RA_ZB_OPA_DECAL(clk) \ - AA_EN | Z_CMP | CVG_DST_WRAP | ALPHA_CVG_SEL | \ + AA_DEF | Z_CMP | CVG_DST_WRAP | ALPHA_CVG_SEL | \ ZMODE_DEC | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_AA_ZB_XLU_DECAL(clk) \ - AA_EN | Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \ + AA_DEF | Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \ FORCE_BL | ZMODE_DEC | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_ZB_OPA_INTER(clk) \ - AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | Z_CMP | Z_UPD | RD_DEF | CVG_DST_CLAMP | \ ALPHA_CVG_SEL | ZMODE_INTER | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_RA_ZB_OPA_INTER(clk) \ - AA_EN | Z_CMP | Z_UPD | CVG_DST_CLAMP | \ + AA_DEF | Z_CMP | Z_UPD | CVG_DST_CLAMP | \ ALPHA_CVG_SEL | ZMODE_INTER | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_AA_ZB_XLU_INTER(clk) \ - AA_EN | Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \ + AA_DEF | Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \ FORCE_BL | ZMODE_INTER | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_ZB_XLU_LINE(clk) \ - AA_EN | Z_CMP | IM_RD | CVG_DST_CLAMP | CVG_X_ALPHA | \ + AA_DEF | Z_CMP | IM_RD | CVG_DST_CLAMP | CVG_X_ALPHA | \ ALPHA_CVG_SEL | FORCE_BL | ZMODE_XLU | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_ZB_DEC_LINE(clk) \ - AA_EN | Z_CMP | IM_RD | CVG_DST_SAVE | CVG_X_ALPHA | \ + AA_DEF | Z_CMP | IM_RD | CVG_DST_SAVE | CVG_X_ALPHA | \ ALPHA_CVG_SEL | FORCE_BL | ZMODE_DEC | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) +/* Note that this uses AA_EN not AA_DEF */ #define RM_AA_ZB_TEX_EDGE(clk) \ - AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \ + AA_EN | Z_CMP | Z_UPD | RD_DEF | CVG_DST_CLAMP | \ CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_OPA | TEX_EDGE | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_AA_ZB_TEX_INTER(clk) \ - AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | Z_CMP | Z_UPD | RD_DEF | CVG_DST_CLAMP | \ CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_INTER | TEX_EDGE | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_AA_ZB_SUB_SURF(clk) \ - AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_FULL | \ + AA_DEF | Z_CMP | Z_UPD | IM_RD | CVG_DST_FULL | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_AA_ZB_PCL_SURF(clk) \ - AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \ ZMODE_OPA | G_AC_DITHER | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_ZB_OPA_TERR(clk) \ - AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | Z_CMP | Z_UPD | RD_DEF | CVG_DST_CLAMP | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_ZB_TEX_TERR(clk) \ - AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | Z_CMP | Z_UPD | RD_DEF | CVG_DST_CLAMP | \ CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_OPA | TEX_EDGE | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_ZB_SUB_TERR(clk) \ - AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_FULL | \ + AA_DEF | Z_CMP | Z_UPD | IM_RD | CVG_DST_FULL | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_OPA_SURF(clk) \ - AA_EN | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | RD_DEF | CVG_DST_CLAMP | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_RA_OPA_SURF(clk) \ - AA_EN | CVG_DST_CLAMP | \ + AA_DEF | CVG_DST_CLAMP | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_AA_XLU_SURF(clk) \ - AA_EN | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | FORCE_BL | \ + AA_DEF | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | FORCE_BL | \ ZMODE_OPA | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_XLU_LINE(clk) \ - AA_EN | IM_RD | CVG_DST_CLAMP | CVG_X_ALPHA | \ + AA_DEF | IM_RD | CVG_DST_CLAMP | CVG_X_ALPHA | \ ALPHA_CVG_SEL | FORCE_BL | ZMODE_OPA | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_DEC_LINE(clk) \ - AA_EN | IM_RD | CVG_DST_FULL | CVG_X_ALPHA | \ + AA_DEF | IM_RD | CVG_DST_FULL | CVG_X_ALPHA | \ ALPHA_CVG_SEL | FORCE_BL | ZMODE_OPA | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) +/* Note that this uses AA_EN not AA_DEF */ #define RM_AA_TEX_EDGE(clk) \ - AA_EN | IM_RD | CVG_DST_CLAMP | \ + AA_EN | RD_DEF | CVG_DST_CLAMP | \ CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_OPA | TEX_EDGE | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_AA_SUB_SURF(clk) \ - AA_EN | IM_RD | CVG_DST_FULL | \ + AA_DEF | IM_RD | CVG_DST_FULL | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM) #define RM_AA_PCL_SURF(clk) \ - AA_EN | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | IM_RD | CVG_DST_CLAMP | \ ZMODE_OPA | G_AC_DITHER | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_OPA_TERR(clk) \ - AA_EN | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | RD_DEF | CVG_DST_CLAMP | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_TEX_TERR(clk) \ - AA_EN | IM_RD | CVG_DST_CLAMP | \ + AA_DEF | RD_DEF | CVG_DST_CLAMP | \ CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_OPA | TEX_EDGE | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) #define RM_AA_SUB_TERR(clk) \ - AA_EN | IM_RD | CVG_DST_FULL | \ + AA_DEF | IM_RD | CVG_DST_FULL | \ ZMODE_OPA | ALPHA_CVG_SEL | \ GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA) @@ -995,36 +1037,39 @@ longer a multiple of 8 (DMA word). This was not used in any command anyway. */ * Data Structures */ -/* +/** * Vertex (set up for use with colors) */ typedef struct { - short ob[3]; /* x, y, z */ - unsigned short flag; /* Holds packed normals, or unused */ - short tc[2]; /* texture coord */ - unsigned char cn[4]; /* color & alpha */ + short ob[3]; /** x, y, z */ + unsigned short flag; /** Holds packed normals, or unused */ + short tc[2]; /** texture coord */ + unsigned char cn[4]; /** color & alpha */ } Vtx_t; -/* - * Vertex (set up for use with normals) +/** + * @copydetails Vtx_t */ typedef struct { - short ob[3]; /* x, y, z */ - unsigned short flag; /* Packed normals are not used when normals are in colors */ - short tc[2]; /* texture coord */ - signed char n[3]; /* normal */ - unsigned char a; /* alpha */ + short ob[3]; /** x, y, z */ + unsigned short flag; /** Packed normals are not used when normals are in colors */ + short tc[2]; /** texture coord */ + signed char n[3]; /** normal */ + unsigned char a; /** alpha */ } Vtx_tn; +/** + * @copydetails Vtx_t + */ typedef union { - Vtx_t v; /* Use this one for colors */ - Vtx_tn n; /* Use this one for normals */ + Vtx_t v; /** Use this one for colors */ + Vtx_tn n; /** Use this one for normals */ long long int force_structure_alignment; } Vtx; typedef struct { short pos[3]; - short pad; /* value ignored, need not be 0 */ + short pad; /** value ignored, need not be 0 */ } PlainVtx_t; typedef union { @@ -1032,7 +1077,7 @@ typedef union { long long int force_structure_alignment; } PlainVtx; -/* +/** * Triangle face */ typedef struct { @@ -1040,7 +1085,7 @@ typedef struct { unsigned char v[3]; } Tri; -/* +/** * 4x4 matrix, fixed point s15.16 format. * First 8 words are integer portion of the 4x4 matrix * Last 8 words are the fraction portion of the 4x4 matrix @@ -1086,25 +1131,48 @@ typedef union { * Viewport */ -/* - * This magic value is the maximum INTEGER z-range of the hardware - * (there are also 16-bits of fraction, which are introduced during - * any transformations). This is not just a good idea, it's the law. - * Feeding the hardware eventual z-coordinates (after any transforms - * or scaling) bigger than this, will not work. +/** + * There have been two breaking changes made to the F3DEX3 viewport relative to + * F3DEX2 and all previous F3D microcodes. + * - Max Z value changed from 0x03FF to 0x7FFF + * - Y scale is negated (offset is not negated) * - * This number is DIFFERENT than G_MAXFBZ, which is the maximum value - * you want to use to initialize the z-buffer. + * The reason for these changes is as follows. Apparently, SGI initially + * intended the actual range of Z values in RDP triangle commands to be 0x03FF + * (integer, plus 16 fractional bits). So this was set up in the GBI and games + * were initially made this way. The actual range is 0x7FFF (plus 16 frac), at + * least for RCP HW V2 (retail). So, instead of updating the value in the GBI, + * SGI just added a scale up by 0x20 at the very end of the triangle processing + * when writing out the Z coefficients to the RDP. Because of the way this + * writing was implemented, there did not appear to be any performance penalty + * to this scaling, so it just worked. * - * The reason these are different is mildly interesting, but too long - * to explain here. It is basically the result of optimizations in the - * hardware. A more generic API might hide this detail from the users, - * but we don't have the ucode to do that... + * F3DEX3 moves this scale up to the viewport affine transformation step at the + * end of the vertex processing, which allows an extra 5 bits of Z precision to + * be retained during some intermediate calculations for the attributes in the + * triangle write. In EX2, precision is sometimes lost in these calculations, + * leading to Z fighting. In addition, F3DEX3 optimizes the Z writing, saving a + * few cycles per written tri. * + * As far as the Y scale being negated, F3DEX2 did this at the cost of 3 + * instructions, but doing this on the CPU when creating the viewport is + * effectively free. + * + * Both of these changes were made together--and this macro was changed to an + * error instead of just being changed to the new value--in order to maximize + * the chances the developer actually changes their viewport. Some game + * codebases might have the value derived from G_MAXZ hardcoded, so they might + * miss this change and start getting weird Z buffer issues. But they won't miss + * their game being upside down. */ -#define G_MAXZ 0x03FF /* 10 bits of integer screen-Z precision */ +#define G_MAXZ Error_please_update_viewport_Z_and_Y_see_GBI -/* +/** + * New max Z value for viewport. + */ +#define G_NEW_MAXZ 0x7FFF + +/** * The viewport structure elements have 2 bits of fraction, necessary * to accomodate the sub-pixel positioning scaling for the hardware. * This can also be exploited to handle odd-sized viewports. @@ -1112,12 +1180,12 @@ typedef union { * Accounting for these fractional bits, using the default projection * and viewing matrices, the viewport structure is initialized thusly: * - * (SCREEN_WD/2)*4, (SCREEN_HT/2)*4, G_MAXZ, 0, - * (SCREEN_WD/2)*4, (SCREEN_HT/2)*4, 0, 0, + * (SCREEN_WD/2)*4, -(SCREEN_HT/2)*4, G_NEW_MAXZ/2, 0, + * (SCREEN_WD/2)*4, (SCREEN_HT/2)*4, G_NEW_MAXZ/2, 0, */ typedef struct { - short vscale[4]; /* scale, 2 bits fraction */ - short vtrans[4]; /* translate, 2 bits fraction */ + short vscale[4]; /** scale, 2 bits fraction (X and Y only) */ + short vtrans[4]; /** translate, 2 bits fraction (X and Y only) */ /* both the above arrays are padded to 64-bit boundary */ } Vp_t; @@ -1126,48 +1194,56 @@ typedef union { long long int force_structure_alignment[2]; } Vp; -/* +/** * Light structure. * * Note: the weird order is for the DMEM alignment benefit of * the microcode. */ - typedef struct { - unsigned char col[3]; /* diffuse light color (rgb) */ - unsigned char type; /* formerly pad1; MUST SET TO 0 to indicate directional light */ - unsigned char colc[3]; /* copy of diffuse light color (rgb) */ + unsigned char col[3]; /** diffuse light color (rgb) */ + unsigned char type; /** formerly pad1; MUST SET TO 0 to indicate directional light */ + unsigned char colc[3]; /** copy of diffuse light color (rgb) */ char pad2; - signed char dir[3]; /* direction of light (normalized) */ + signed char dir[3]; /** direction of light (normalized) */ char pad3; char pad4[3]; - unsigned char size; /* For specular only; reasonable values are 1-4 */ + unsigned char size; /** For specular only; reasonable values are 1-4 */ } Light_t; +/** + * Light structure. + * + * Note: the weird order is for the DMEM alignment benefit of + * the microcode. + */ typedef struct { - unsigned char col[3]; /* point light color (rgb) */ - unsigned char kc; /* point light enable flag (> 0) & constant attenuation Kc */ - unsigned char colc[3]; /* copy of point light color (rgb) */ - unsigned char kl; /* linear attenuation Kl */ - short pos[3]; /* light position x, y, z in world space */ - unsigned char kq; /* quadratic attenuation Kq */ - unsigned char size; /* For specular only; reasonable values are 1-4 */ -} PosLight_t; + unsigned char col[3]; /** point light color (rgb) */ + unsigned char kc; /** constant attenuation (> 0 indicates point light) */ + unsigned char colc[3]; /** copy of point light color (rgb) */ + unsigned char kl; /** linear attenuation */ + short pos[3]; /** world-space position of light */ + unsigned char kq; /** quadratic attenuation */ + unsigned char size; /** For specular only; reasonable values are 1-4 */ +} PointLight_t; +/** + * @copydetails PosLight_t + */ typedef struct { - unsigned char col[3]; /* ambient light color (rgb) */ + unsigned char col[3]; /** ambient light color (rgb) */ char pad1; - unsigned char colc[3]; /* copy of ambient light color (rgb) */ + unsigned char colc[3]; /** copy of ambient light color (rgb) */ char pad2; } Ambient_t; typedef struct { - signed char dir[3]; /* direction of lookat (normalized) */ + signed char dir[3]; /** direction of lookat (normalized) */ char pad1; } LookAt_t; typedef struct { - LookAt_t l; /* for backwards compatibility */ + LookAt_t l; /** for backwards compatibility */ } LookAtWrapper; typedef struct { @@ -1194,17 +1270,17 @@ typedef struct { } OcclusionPlane_t; typedef struct { - /* Four vertices of a quad, XYZ components in world space */ struct { short x; short y; short z; - } v[4]; - float weight; /* Higher if there's a lot of stuff behind it */ + } v[4]; /** Four vertices of a quad, XYZ components in world space */ + float weight; /** Higher if there's a lot of stuff behind it */ } OcclusionPlaneCandidate; typedef union { - Light_t l; + Light_t l; + PointLight_t p; long long int force_structure_alignment[2]; } Light; @@ -1213,12 +1289,6 @@ typedef union { long long int force_structure_alignment[1]; } Ambient; -typedef union { - PosLight_t p; - Light_t l; - long long int force_structure_alignment[2]; -} PosLight; - typedef union { LookAtWrapper l[2]; long long int force_structure_alignment[1]; @@ -1291,474 +1361,343 @@ typedef struct { Ambient a; } Lights9; -typedef struct { - PosLight l[9]; - Ambient a; -} PosLightsn; +#define gDefAmbient(r, g, b) \ + {{ \ + { (r), (g), (b) }, 0, \ + { (r), (g), (b) }, 0, \ + }} -typedef struct { - /* F3DEX3 properly supports zero lights, unlike F3DEX2 where you need - to include one black directional light. */ - Ambient a; -} PosLights0; +#define gDefLight(r, g, b, x, y, z) \ + {{ \ + { (r), (g), (b) }, 0, \ + { (r), (g), (b) }, 0, \ + { (x), (y), (z) }, 0, \ + { 0, 0, 0 }, 0, \ + }} -typedef struct { - PosLight l[1]; - Ambient a; -} PosLights1; +#define gdSPDefLights0(ar, ag, ab) \ + { \ + gDefAmbient(ar, ag, ab), \ + } -typedef struct { - PosLight l[2]; - Ambient a; -} PosLights2; +#define gdSPDefLights1(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1) \ + { \ + { \ + gDefLight(r1, g1, b1, x1, y1, z1), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -typedef struct { - PosLight l[3]; - Ambient a; -} PosLights3; +#define gdSPDefLights2(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, \ + r2, g2, b2, x2, y2, z2) \ + { \ + { \ + gDefLight(r1, g1, b1, x1, y1, z1), \ + gDefLight(r2, g2, b2, x2, y2, z2), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -typedef struct { - PosLight l[4]; - Ambient a; -} PosLights4; +#define gdSPDefLights3(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, \ + r2, g2, b2, x2, y2, z2) \ + r3, g3, b3, x3, y3, z3) \ + { \ + { \ + gDefLight(r1, g1, b1, x1, y1, z1), \ + gDefLight(r2, g2, b2, x2, y2, z2), \ + gDefLight(r3, g3, b3, x3, y3, z3), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -typedef struct { - PosLight l[5]; - Ambient a; -} PosLights5; +#define gdSPDefLights4(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, \ + r2, g2, b2, x2, y2, z2, \ + r3, g3, b3, x3, y3, z3, \ + r4, g4, b4, x4, y4, z4) \ + { \ + { \ + gDefLight(r1, g1, b1, x1, y1, z1), \ + gDefLight(r2, g2, b2, x2, y2, z2), \ + gDefLight(r3, g3, b3, x3, y3, z3), \ + gDefLight(r4, g4, b4, x4, y4, z4), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -typedef struct { - PosLight l[6]; - Ambient a; -} PosLights6; +#define gdSPDefLights5(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, \ + r2, g2, b2, x2, y2, z2, \ + r3, g3, b3, x3, y3, z3, \ + r4, g4, b4, x4, y4, z4, \ + r5, g5, b5, x5, y5, z5) \ + { \ + { \ + gDefLight(r1, g1, b1, x1, y1, z1), \ + gDefLight(r2, g2, b2, x2, y2, z2), \ + gDefLight(r3, g3, b3, x3, y3, z3), \ + gDefLight(r4, g4, b4, x4, y4, z4), \ + gDefLight(r5, g5, b5, x5, y5, z5), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -typedef struct { - PosLight l[7]; - Ambient a; -} PosLights7; +#define gdSPDefLights6(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, \ + r2, g2, b2, x2, y2, z2, \ + r3, g3, b3, x3, y3, z3, \ + r4, g4, b4, x4, y4, z4, \ + r5, g5, b5, x5, y5, z5, \ + r6, g6, b6, x6, y6, z6) \ + { \ + { \ + gDefLight(r1, g1, b1, x1, y1, z1), \ + gDefLight(r2, g2, b2, x2, y2, z2), \ + gDefLight(r3, g3, b3, x3, y3, z3), \ + gDefLight(r4, g4, b4, x4, y4, z4), \ + gDefLight(r5, g5, b5, x5, y5, z5), \ + gDefLight(r6, g6, b6, x6, y6, z6), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -typedef struct { - PosLight l[8]; - Ambient a; -} PosLights8; +#define gdSPDefLights7(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, \ + r2, g2, b2, x2, y2, z2, \ + r3, g3, b3, x3, y3, z3, \ + r4, g4, b4, x4, y4, z4, \ + r5, g5, b5, x5, y5, z5, \ + r6, g6, b6, x6, y6, z6, \ + r7, g7, b7, x7, y7, z7) \ + { \ + { \ + gDefLight(r1, g1, b1, x1, y1, z1), \ + gDefLight(r2, g2, b2, x2, y2, z2), \ + gDefLight(r3, g3, b3, x3, y3, z3), \ + gDefLight(r4, g4, b4, x4, y4, z4), \ + gDefLight(r5, g5, b5, x5, y5, z5), \ + gDefLight(r6, g6, b6, x6, y6, z6), \ + gDefLight(r7, g7, b7, x7, y7, z7), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -typedef struct { - PosLight l[9]; - Ambient a; -} PosLights9; +#define gdSPDefLights8(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, \ + r2, g2, b2, x2, y2, z2, \ + r3, g3, b3, x3, y3, z3, \ + r4, g4, b4, x4, y4, z4, \ + r5, g5, b5, x5, y5, z5, \ + r6, g6, b6, x6, y6, z6, \ + r7, g7, b7, x7, y7, z7, \ + r8, g8, b8, x8, y8, z8) \ + { \ + { \ + gDefLight(r1, g1, b1, x1, y1, z1), \ + gDefLight(r2, g2, b2, x2, y2, z2), \ + gDefLight(r3, g3, b3, x3, y3, z3), \ + gDefLight(r4, g4, b4, x4, y4, z4), \ + gDefLight(r5, g5, b5, x5, y5, z5), \ + gDefLight(r6, g6, b6, x6, y6, z6), \ + gDefLight(r7, g7, b7, x7, y7, z7), \ + gDefLight(r8, g8, b8, x8, y8, z8), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -#define gdSPDefLights0(ar, ag, ab) \ - { \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gdSPDefLights9(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, \ + r2, g2, b2, x2, y2, z2, \ + r3, g3, b3, x3, y3, z3, \ + r4, g4, b4, x4, y4, z4, \ + r5, g5, b5, x5, y5, z5, \ + r6, g6, b6, x6, y6, z6, \ + r7, g7, b7, x7, y7, z7, \ + r8, g8, b8, x8, y8, z8, \ + r9, g9, b9, x9, y9, z9) \ + { \ + { \ + gDefLight(r1, g1, b1, x1, y1, z1), \ + gDefLight(r2, g2, b2, x2, y2, z2), \ + gDefLight(r3, g3, b3, x3, y3, z3), \ + gDefLight(r4, g4, b4, x4, y4, z4), \ + gDefLight(r5, g5, b5, x5, y5, z5), \ + gDefLight(r6, g6, b6, x6, y6, z6), \ + gDefLight(r7, g7, b7, x7, y7, z7), \ + gDefLight(r8, g8, b8, x8, y8, z8), \ + gDefLight(r9, g9, b9, x9, y9, z9), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -#define gdSPDefLights1(ar, ag, ab, \ - r1, g1, b1, x1, y1, z1) \ - { \ - { \ - {{ \ - { r1, g1, b1 }, 0, \ - { r1, g1, b1 }, 0, \ - { x1, y1, z1 }, 0, \ - { 0, 0, 0 }, 0 \ - }} \ - }, \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gDefPointLight(r, g, b, x, y, z, kc, kl, kq) \ + {{ \ + { (r1), (g1), (b1) }, (kc), \ + { (r1), (g1), (b1) }, (kl), \ + { (x1), (y1), (z1) }, (kq), \ + 0, \ + }} -#define gdSPDefLights2(ar, ag, ab, \ - r1, g1, b1, x1, y1, z1, \ - r2, g2, b2, x2, y2, z2) \ - { \ - { \ - {{ \ - { r1, g1, b1 }, 0, \ - { r1, g1, b1 }, 0, \ - { x1, y1, z1 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r2, g2, b2 }, 0, \ - { r2, g2, b2 }, 0, \ - { x2, y2, z2 }, 0, \ - { 0, 0, 0 }, 0 \ - }} \ - }, \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gdSPDefPointLights0(ar, ag, ab) \ + { \ + gDefAmbient(ar, ag, ab), \ + } -#define gdSPDefLights3(ar, ag, ab, \ - r1, g1, b1, x1, y1, z1, \ - r2, g2, b2, x2, y2, z2, \ - r3, g3, b3, x3, y3, z3) \ - { \ - { \ - {{ \ - { r1, g1, b1 }, 0, \ - { r1, g1, b1 }, 0, \ - { x1, y1, z1 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r2, g2, b2 }, 0, \ - { r2, g2, b2 }, 0, \ - { x2, y2, z2 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r3, g3, b3 }, 0, \ - { r3, g3, b3 }, 0, \ - { x3, y3, z3 }, 0, \ - { 0, 0, 0 }, 0 \ - }} \ - }, \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gdSPDefPointLights1(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, c1, l1, q1) \ + { \ + { \ + gDefPointLight(r1, g1, b1, x1, y1, z1, c1, l1, q1), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -#define gdSPDefLights4(ar, ag, ab, \ - r1, g1, b1, x1, y1, z1, \ - r2, g2, b2, x2, y2, z2, \ - r3, g3, b3, x3, y3, z3, \ - r4, g4, b4, x4, y4, z4) \ - { \ - { \ - {{ \ - { r1, g1, b1 }, 0, \ - { r1, g1, b1 }, 0, \ - { x1, y1, z1 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r2, g2, b2 }, 0, \ - { r2, g2, b2 }, 0, \ - { x2, y2, z2 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r3, g3, b3 }, 0, \ - { r3, g3, b3 }, 0, \ - { x3, y3, z3 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r4, g4, b4 }, 0, \ - { r4, g4, b4 }, 0, \ - { x4, y4, z4 }, 0, \ - { 0, 0, 0 }, 0 \ - }} \ - }, \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gdSPDefPointLights2(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, c1, l1, q1, \ + r2, g2, b2, x2, y2, z2, c2, l2, q2) \ + { \ + { \ + gDefPointLight(r1, g1, b1, x1, y1, z1, c1, l1, q1), \ + gDefPointLight(r2, g2, b2, x2, y2, z2, c2, l2, q2), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -#define gdSPDefLights5(ar, ag, ab, \ - r1, g1, b1, x1, y1, z1, \ - r2, g2, b2, x2, y2, z2, \ - r3, g3, b3, x3, y3, z3, \ - r4, g4, b4, x4, y4, z4, \ - r5, g5, b5, x5, y5, z5) \ - { \ - { \ - {{ \ - { r1, g1, b1 }, 0, \ - { r1, g1, b1 }, 0, \ - { x1, y1, z1 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r2, g2, b2 }, 0, \ - { r2, g2, b2 }, 0, \ - { x2, y2, z2 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r3, g3, b3 }, 0, \ - { r3, g3, b3 }, 0, \ - { x3, y3, z3 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r4, g4, b4 }, 0, \ - { r4, g4, b4 }, 0, \ - { x4, y4, z4 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r5, g5, b5 }, 0, \ - { r5, g5, b5 }, 0, \ - { x5, y5, z5 }, 0, \ - { 0, 0, 0 }, 0 \ - }} \ - }, \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gdSPDefPointLights3(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, c1, l1, q1, \ + r2, g2, b2, x2, y2, z2, c2, l2, q2, \ + r3, g3, b3, x3, y3, z3, c3, l3, q3) \ + { \ + { \ + gDefPointLight(r1, g1, b1, x1, y1, z1, c1, l1, q1), \ + gDefPointLight(r2, g2, b2, x2, y2, z2, c2, l2, q2), \ + gDefPointLight(r3, g3, b3, x3, y3, z3, c3, l3, q3), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -#define gdSPDefLights6(ar, ag, ab, \ - r1, g1, b1, x1, y1, z1, \ - r2, g2, b2, x2, y2, z2, \ - r3, g3, b3, x3, y3, z3, \ - r4, g4, b4, x4, y4, z4, \ - r5, g5, b5, x5, y5, z5, \ - r6, g6, b6, x6, y6, z6) \ - { \ - { \ - {{ \ - { r1, g1, b1 }, 0, \ - { x1, y1, z1 }, 0, \ - { r1, g1, b1 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r2, g2, b2 }, 0, \ - { r2, g2, b2 }, 0, \ - { x2, y2, z2 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r3, g3, b3 }, 0, \ - { r3, g3, b3 }, 0, \ - { x3, y3, z3 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r4, g4, b4 }, 0, \ - { r4, g4, b4 }, 0, \ - { x4, y4, z4 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r5, g5, b5 }, 0, \ - { r5, g5, b5 }, 0, \ - { x5, y5, z5 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r6, g6, b6 }, 0, \ - { r6, g6, b6 }, 0, \ - { x6, y6, z6 }, 0, \ - { 0, 0, 0 }, 0 \ - }} \ - }, \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gdSPDefPointLights4(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, c1, l1, q1, \ + r2, g2, b2, x2, y2, z2, c2, l2, q2, \ + r3, g3, b3, x3, y3, z3, c3, l3, q3, \ + r4, g4, b4, x4, y4, z4, c4, l4, q4) \ + { \ + { \ + gDefPointLight(r1, g1, b1, x1, y1, z1, c1, l1, q1), \ + gDefPointLight(r2, g2, b2, x2, y2, z2, c2, l2, q2), \ + gDefPointLight(r3, g3, b3, x3, y3, z3, c3, l3, q3), \ + gDefPointLight(r4, g4, b4, x4, y4, z4, c4, l4, q4), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -#define gdSPDefLights7(ar, ag, ab, \ - r1, g1, b1, x1, y1, z1, \ - r2, g2, b2, x2, y2, z2, \ - r3, g3, b3, x3, y3, z3, \ - r4, g4, b4, x4, y4, z4, \ - r5, g5, b5, x5, y5, z5, \ - r6, g6, b6, x6, y6, z6, \ - r7, g7, b7, x7, y7, z7) \ - { \ - { \ - {{ \ - { r1, g1, b1 }, 0, \ - { r1, g1, b1 }, 0, \ - { x1, y1, z1 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r2, g2, b2 }, 0, \ - { r2, g2, b2 }, 0, \ - { x2, y2, z2 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r3, g3, b3 }, 0, \ - { r3, g3, b3 }, 0, \ - { x3, y3, z3 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r4, g4, b4 }, 0, \ - { r4, g4, b4 }, 0, \ - { x4, y4, z4 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r5, g5, b5 }, 0, \ - { r5, g5, b5 }, 0, \ - { x5, y5, z5 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r6, g6, b6 }, 0, \ - { r6, g6, b6 }, 0, \ - { x6, y6, z6 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r7, g7, b7 }, 0, \ - { r7, g7, b7 }, 0, \ - { x7, y7, z7 }, 0, \ - { 0, 0, 0 }, 0 \ - }} \ - }, \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gdSPDefPointLights5(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, c1, l1, q1, \ + r2, g2, b2, x2, y2, z2, c2, l2, q2, \ + r3, g3, b3, x3, y3, z3, c3, l3, q3, \ + r4, g4, b4, x4, y4, z4, c4, l4, q4, \ + r5, g5, b5, x5, y5, z5, c5, l5, q5) \ + { \ + { \ + gDefPointLight(r1, g1, b1, x1, y1, z1, c1, l1, q1), \ + gDefPointLight(r2, g2, b2, x2, y2, z2, c2, l2, q2), \ + gDefPointLight(r3, g3, b3, x3, y3, z3, c3, l3, q3), \ + gDefPointLight(r4, g4, b4, x4, y4, z4, c4, l4, q4), \ + gDefPointLight(r5, g5, b5, x5, y5, z5, c5, l5, q5), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -#define gdSPDefLights8(ar, ag, ab, \ - r1, g1, b1, x1, y1, z1, \ - r2, g2, b2, x2, y2, z2, \ - r3, g3, b3, x3, y3, z3, \ - r4, g4, b4, x4, y4, z4, \ - r5, g5, b5, x5, y5, z5, \ - r6, g6, b6, x6, y6, z6, \ - r7, g7, b7, x7, y7, z7, \ - r8, g8, b8, x8, y8, z8) \ - { \ - { \ - {{ \ - { r1, g1, b1 }, 0, \ - { r1, g1, b1 }, 0, \ - { x1, y1, z1 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r2, g2, b2 }, 0, \ - { r2, g2, b2 }, 0, \ - { x2, y2, z2 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r3, g3, b3 }, 0, \ - { r3, g3, b3 }, 0, \ - { x3, y3, z3 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r4, g4, b4 }, 0, \ - { r4, g4, b4 }, 0, \ - { x4, y4, z4 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r5, g5, b5 }, 0, \ - { r5, g5, b5 }, 0, \ - { x5, y5, z5 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r6, g6, b6 }, 0, \ - { r6, g6, b6 }, 0, \ - { x6, y6, z6 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r7, g7, b7 }, 0, \ - { r7, g7, b7 }, 0, \ - { x7, y7, z7 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r8, g8, b8 }, 0, \ - { r8, g8, b8 }, 0, \ - { x8, y8, z8 }, 0, \ - { 0, 0, 0 }, 0 \ - }} \ - }, \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gdSPDefPointLights6(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, c1, l1, q1, \ + r2, g2, b2, x2, y2, z2, c2, l2, q2, \ + r3, g3, b3, x3, y3, z3, c3, l3, q3, \ + r4, g4, b4, x4, y4, z4, c4, l4, q4, \ + r5, g5, b5, x5, y5, z5, c5, l5, q5, \ + r6, g6, b6, x6, y6, z6, c6, l6, q6) \ + { \ + { \ + gDefPointLight(r1, g1, b1, x1, y1, z1, c1, l1, q1), \ + gDefPointLight(r2, g2, b2, x2, y2, z2, c2, l2, q2), \ + gDefPointLight(r3, g3, b3, x3, y3, z3, c3, l3, q3), \ + gDefPointLight(r4, g4, b4, x4, y4, z4, c4, l4, q4), \ + gDefPointLight(r5, g5, b5, x5, y5, z5, c5, l5, q5), \ + gDefPointLight(r6, g6, b6, x6, y6, z6, c6, l6, q6), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } -#define gdSPDefLights9(ar, ag, ab, \ - r1, g1, b1, x1, y1, z1, \ - r2, g2, b2, x2, y2, z2, \ - r3, g3, b3, x3, y3, z3, \ - r4, g4, b4, x4, y4, z4, \ - r5, g5, b5, x5, y5, z5, \ - r6, g6, b6, x6, y6, z6, \ - r7, g7, b7, x7, y7, z7, \ - r8, g8, b8, x8, y8, z8, \ - r9, g9, b9, x9, y9, z9) \ - { \ - { \ - {{ \ - { r1, g1, b1 }, 0, \ - { r1, g1, b1 }, 0, \ - { x1, y1, z1 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r2, g2, b2 }, 0, \ - { r2, g2, b2 }, 0, \ - { x2, y2, z2 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r3, g3, b3 }, 0, \ - { r3, g3, b3 }, 0, \ - { x3, y3, z3 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r4, g4, b4 }, 0, \ - { r4, g4, b4 }, 0, \ - { x4, y4, z4 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r5, g5, b5 }, 0, \ - { r5, g5, b5 }, 0, \ - { x5, y5, z5 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r6, g6, b6 }, 0, \ - { r6, g6, b6 }, 0, \ - { x6, y6, z6 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r7, g7, b7 }, 0, \ - { r7, g7, b7 }, 0, \ - { x7, y7, z7 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r8, g8, b8 }, 0, \ - { r8, g8, b8 }, 0, \ - { x8, y8, z8 }, 0, \ - { 0, 0, 0 }, 0 \ - }}, \ - {{ \ - { r9, g9, b9 }, 0, \ - { r9, g9, b9 }, 0, \ - { x9, y9, z9 }, 0, \ - { 0, 0, 0 }, 0 \ - }} \ - }, \ - {{ \ - { ar, ag, ab }, 0, \ - { ar, ag, ab }, 0, \ - }} \ - } +#define gdSPDefPointLights7(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, c1, l1, q1, \ + r2, g2, b2, x2, y2, z2, c2, l2, q2, \ + r3, g3, b3, x3, y3, z3, c3, l3, q3, \ + r4, g4, b4, x4, y4, z4, c4, l4, q4, \ + r5, g5, b5, x5, y5, z5, c5, l5, q5, \ + r6, g6, b6, x6, y6, z6, c6, l6, q6, \ + r7, g7, b7, x7, y7, z7, c7, l7, q7) \ + { \ + { \ + gDefPointLight(r1, g1, b1, x1, y1, z1, c1, l1, q1), \ + gDefPointLight(r2, g2, b2, x2, y2, z2, c2, l2, q2), \ + gDefPointLight(r3, g3, b3, x3, y3, z3, c3, l3, q3), \ + gDefPointLight(r4, g4, b4, x4, y4, z4, c4, l4, q4), \ + gDefPointLight(r5, g5, b5, x5, y5, z5, c5, l5, q5), \ + gDefPointLight(r6, g6, b6, x6, y6, z6, c6, l6, q6), \ + gDefPointLight(r7, g7, b7, x7, y7, z7, c7, l7, q7), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } + +#define gdSPDefPointLights8(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, c1, l1, q1, \ + r2, g2, b2, x2, y2, z2, c2, l2, q2, \ + r3, g3, b3, x3, y3, z3, c3, l3, q3, \ + r4, g4, b4, x4, y4, z4, c4, l4, q4, \ + r5, g5, b5, x5, y5, z5, c5, l5, q5, \ + r6, g6, b6, x6, y6, z6, c6, l6, q6, \ + r7, g7, b7, x7, y7, z7, c7, l7, q7, \ + r8, g8, b8, x8, y8, z8, c8, l8, q8) \ + { \ + { \ + gDefPointLight(r1, g1, b1, x1, y1, z1, c1, l1, q1), \ + gDefPointLight(r2, g2, b2, x2, y2, z2, c2, l2, q2), \ + gDefPointLight(r3, g3, b3, x3, y3, z3, c3, l3, q3), \ + gDefPointLight(r4, g4, b4, x4, y4, z4, c4, l4, q4), \ + gDefPointLight(r5, g5, b5, x5, y5, z5, c5, l5, q5), \ + gDefPointLight(r6, g6, b6, x6, y6, z6, c6, l6, q6), \ + gDefPointLight(r7, g7, b7, x7, y7, z7, c7, l7, q7), \ + gDefPointLight(r8, g8, b8, x8, y8, z8, c8, l8, q8), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } + +#define gdSPDefPointLights9(ar, ag, ab, \ + r1, g1, b1, x1, y1, z1, c1, l1, q1, \ + r2, g2, b2, x2, y2, z2, c2, l2, q2, \ + r3, g3, b3, x3, y3, z3, c3, l3, q3, \ + r4, g4, b4, x4, y4, z4, c4, l4, q4, \ + r5, g5, b5, x5, y5, z5, c5, l5, q5, \ + r6, g6, b6, x6, y6, z6, c6, l6, q6, \ + r7, g7, b7, x7, y7, z7, c7, l7, q7, \ + r8, g8, b8, x8, y8, z8, c8, l8, q8, \ + r9, g9, b9, x9, y9, z9, c9, l9, q9) \ + { \ + { \ + gDefPointLight(r1, g1, b1, x1, y1, z1, c1, l1, q1), \ + gDefPointLight(r2, g2, b2, x2, y2, z2, c2, l2, q2), \ + gDefPointLight(r3, g3, b3, x3, y3, z3, c3, l3, q3), \ + gDefPointLight(r4, g4, b4, x4, y4, z4, c4, l4, q4), \ + gDefPointLight(r5, g5, b5, x5, y5, z5, c5, l5, q5), \ + gDefPointLight(r6, g6, b6, x6, y6, z6, c6, l6, q6), \ + gDefPointLight(r7, g7, b7, x7, y7, z7, c7, l7, q7), \ + gDefPointLight(r8, g8, b8, x8, y8, z8, c8, l8, q8), \ + gDefPointLight(r9, g9, b9, x9, y9, z9, c9, l9, q9), \ + }, \ + gDefAmbient(ar, ag, ab), \ + } #define gdSPDefLookAt(rightx, righty, rightz, upx, upy, upz) \ { \ @@ -1766,80 +1705,6 @@ typedef struct { {{{ upx, upy, upz }, 0 }}, \ } - -#define _gdSPDefAmbient(ar,ag,ab) \ - {{ {ar,ag,ab},0,{ar,ag,ab},0}} -#define _gdSPDefPosLight(r,g,b,x,y,z,c,l,q) \ - {{ {r,g,b},c,{r,g,b},l,{x,y,z},q,0 }} -#define _gdSPDefInfLight(r,g,b,x,y,z) \ - {{ {r,g,b},0,{r,g,b},0,{((x)<<8)|((y)&0xff),(z)<<8,0},0,0}} -#define gdSPDefPosLights0(ar,ag,ab) \ - { _gdSPDefAmbient(ar,ag,ab) } -#define gdSPDefPosLights1(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1) \ - {{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1) }, \ - _gdSPDefAmbient(ar,ag,ab) } -#define gdSPDefPosLights2(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2) \ - {{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \ - _gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2) }, \ - _gdSPDefAmbient(ar,ag,ab) } -#define gdSPDefPosLights3(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3) \ - {{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \ - _gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \ - _gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3) }, \ - _gdSPDefAmbient(ar,ag,ab) } -#define gdSPDefPosLights4(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4) \ - {{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \ - _gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \ - _gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \ - _gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4) }, \ - _gdSPDefAmbient(ar,ag,ab) } -#define gdSPDefPosLights5(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4,r5,g5,b5,x5,y5,z5,c5,l5,q5) \ - {{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \ - _gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \ - _gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \ - _gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4), \ - _gdSPDefPosLight(r5,g5,b5,x5,y5,z5,c5,l5,q5) }, \ - _gdSPDefAmbient(ar,ag,ab) } -#define gdSPDefPosLights6(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4,r5,g5,b5,x5,y5,z5,c5,l5,q5,r6,g6,b6,x6,y6,z6,c6,l6,q6) \ - {{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \ - _gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \ - _gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \ - _gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4), \ - _gdSPDefPosLight(r5,g5,b5,x5,y5,z5,c5,l5,q5), \ - _gdSPDefPosLight(r6,g6,b6,x6,y6,z6,c6,l6,q6) }, \ - _gdSPDefAmbient(ar,ag,ab) } -#define gdSPDefPosLights7(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4,r5,g5,b5,x5,y5,z5,c5,l5,q5,r6,g6,b6,x6,y6,z6,c6,l6,q6,r7,g7,b7,x7,y7,z7,c7,l7,q7) \ - {{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \ - _gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \ - _gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \ - _gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4), \ - _gdSPDefPosLight(r5,g5,b5,x5,y5,z5,c5,l5,q5), \ - _gdSPDefPosLight(r6,g6,b6,x6,y6,z6,c6,l6,q6), \ - _gdSPDefPosLight(r7,g7,b7,x7,y7,z7,c7,l7,q7) }, \ - _gdSPDefAmbient(ar,ag,ab) } -#define gdSPDefPosLights8(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4,r5,g5,b5,x5,y5,z5,c5,l5,q5,r6,g6,b6,x6,y6,z6,c6,l6,q6,r7,g7,b7,x7,y7,z7,c7,l7,q7,r8,g8,b8,x8,y8,z8,c8,l8,q8) \ - {{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \ - _gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \ - _gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \ - _gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4), \ - _gdSPDefPosLight(r5,g5,b5,x5,y5,z5,c5,l5,q5), \ - _gdSPDefPosLight(r6,g6,b6,x6,y6,z6,c6,l6,q6), \ - _gdSPDefPosLight(r7,g7,b7,x7,y7,z7,c7,l7,q7), \ - _gdSPDefPosLight(r8,g8,b8,x8,y8,z8,c8,l8,q8) }, \ - _gdSPDefAmbient(ar,ag,ab) } -#define gdSPDefPosLights9(ar,ag,ab,r1,g1,b1,x1,y1,z1,c1,l1,q1,r2,g2,b2,x2,y2,z2,c2,l2,q2,r3,g3,b3,x3,y3,z3,c3,l3,q3,r4,g4,b4,x4,y4,z4,c4,l4,q4,r5,g5,b5,x5,y5,z5,c5,l5,q5,r6,g6,b6,x6,y6,z6,c6,l6,q6,r7,g7,b7,x7,y7,z7,c7,l7,q7,r8,g8,b8,x8,y8,z8,c8,l8,q8,r9,g9,b9,x9,y9,z9,c9,l9,q9) \ - {{ _gdSPDefPosLight(r1,g1,b1,x1,y1,z1,c1,l1,q1), \ - _gdSPDefPosLight(r2,g2,b2,x2,y2,z2,c2,l2,q2), \ - _gdSPDefPosLight(r3,g3,b3,x3,y3,z3,c3,l3,q3), \ - _gdSPDefPosLight(r4,g4,b4,x4,y4,z4,c4,l4,q4), \ - _gdSPDefPosLight(r5,g5,b5,x5,y5,z5,c5,l5,q5), \ - _gdSPDefPosLight(r6,g6,b6,x6,y6,z6,c6,l6,q6), \ - _gdSPDefPosLight(r7,g7,b7,x7,y7,z7,c7,l7,q7), \ - _gdSPDefPosLight(r8,g8,b8,x8,y8,z8,c8,l8,q8), \ - _gdSPDefPosLight(r9,g9,b9,x9,y9,z9,c9,l9,q9) }, \ - _gdSPDefAmbient(ar,ag,ab) } - - typedef struct { int cmd : 8; unsigned int type : 8; @@ -1855,7 +1720,7 @@ typedef struct { } value; } Gnoop; -/* +/** * Graphics DMA Packet */ typedef struct { @@ -1865,6 +1730,9 @@ typedef struct { unsigned int addr; } Gdma; +/** + * @copydoc Gdma + */ typedef struct { int cmd : 8; unsigned int len : 8; @@ -1873,8 +1741,8 @@ typedef struct { unsigned int addr; } Gdma2; -/* - * Graphics Moveword Packet +/** + * Graphics Moveword Packet */ typedef struct { int cmd : 8; @@ -1883,8 +1751,8 @@ typedef struct { unsigned int data; } Gmovewd; -/* - * Graphics Movemem Packet +/** + * @copydetails Gmovewd */ typedef struct { int cmd : 8; @@ -1894,7 +1762,7 @@ typedef struct { unsigned int data; } Gmovemem; -/* +/** * Graphics Immediate Mode Packet types */ typedef struct { @@ -1978,7 +1846,7 @@ typedef struct { } Gperspnorm; -/* +/** * RDP Packet types */ typedef struct { @@ -2094,7 +1962,7 @@ typedef struct { #define MakeTexRect(xh,yh,flip,tile,xl,yl,s,t,dsdx,dtdy) \ G_TEXRECT, xh, yh, 0, flip, 0, tile, xl, yl, s, t, dsdx, dtdy -/* +/** * Textured rectangles are 128 bits not 64 bits */ typedef struct { @@ -2113,7 +1981,7 @@ typedef struct { unsigned int addr; } Gvtx; -/* +/** * Generic Gfx Packet */ typedef struct { @@ -2121,7 +1989,7 @@ typedef struct { unsigned int w1; } Gwords; -/* +/** * This union is the fundamental type of the display list. * It is, by law, exactly 64 bits in size. */ @@ -2219,22 +2087,138 @@ _DW({ \ #define gSPNoOp(pkt) gDma0p(pkt, G_SPNOOP, 0, 0) #define gsSPNoOp() gsDma0p( G_SPNOOP, 0, 0) +/** + * @brief macro which inserts a matrix operation at the end display list. + * + * It inserts a matrix operation in the display list. The parameters allow you to select which matrix stack to use (projection or model view), where to load or concatenate, and whether or not to push the matrix stack. The following parameters are bit OR'ed together: + * - @ref G_MTX_PROJECTION @ref G_MTX_MODELVIEW - @copybrief G_MTX_MODELVIEW + * - @ref G_MTX_MUL - @copybrief G_MTX_MUL + * - @ref G_MTX_LOAD - @copybrief G_MTX_LOAD + * - @ref G_MTX_NOPUSH - @copybrief G_MTX_NOPUSH + * - @ref G_MTX_PUSH - @copybrief G_MTX_PUSH + * # Matrix Format + * The format of the fixed-point matrices may seem a little awkward to the application programmer because it is optimized for the RSP geometry engine. This unusual format is hidden in the graphics utility libraries and not usually exposed to the application programmer, but in some cases (static matrix declarations or direct element manipulation) it is necessary to understand the format. + * + * The integer and fractional components of the matrix elements are separated. The first 8 words (16 shorts) hold the 16-bit integer elements, the second 8 words (16 shorts) hold the 16-bit fractional elements. The fact that the Mtx type is declared as a long [4][4] array is slightly misleading. For example, to declare a static identity matrix, use code similar to this: + * ```#include "gbi.h" + * static Mtx ident = + * { + * // integer portion: + * 0x00010000, 0x00000000, + * 0x00000001, 0x00000000, + * 0x00000000, 0x00010000, + * 0x00000000, 0x00000001, + * + * // fractional portion: + * 0x00000000, 0x00000000, + * 0x00000000, 0x00000000, + * 0x00000000, 0x00000000, + * 0x00000000, 0x00000000, + * }; + * ``` + * To force the translation elements of a matrix to be (10.5, 20.5, 30.5), use code similar to this: + * ``` + * #include "gbi.h" + * + * mat.m[1][2] = + * (10 << 16) | (20); + * mat.m[1][3] = + * (30 << 16) | (1); + * + * mat.m[3][2] = + * (0x8000 << 16) | (0x8000); + * mat.m[3][3] = + * (0x8000 << 16) | (0); + * ``` + * @note + * Matrix concatenation in the RSP geometry engine is done using 32-bit integer arithmetic. A 32 x 32 bit multiply results in a 64-bit number. Only the middle 32 bits of this 64-bit result are kept for the new matrix. Therefore, when concatenating matrices, remember about the resulting fixed-point numerical error. + * + * For example, to retain maximum precision, the number ranges must be similar. Large-scale and translate parameters can decrease the transformation precision. Because rotation and projection matrices require quite a bit of fractional accuracy, these fractions may get tossed out if multiplied against large integer numbers. + * + * Each concatenation results in the rounding of the LSB of each matrix term. This means that each concatenation injects 1/2 LSB of error into the matrix. To keep full precision, concatenate matrices in floating-point on the processor and just load the result into the RSP. + * + * # Performance + * Each @ref G_MTX_MODELVIEW matrix operation has an implicit matrix multiplication even if you specify @ref G_MTX_LOAD. This is the combined model view (M) and projection (P) matrix that is necessary for the vertex transformation to use a single matrix during transformation. + * + * You can optimize this by concatenating modeling matrices on the CPU and then putting the viewing (V) and projection matrices on the projection stack. By doing this, you only incur the single MxVP matrix concatenation each time you load a modeling matrix. Furthermore, the application has more information on how to do a cheap hack for modeling matrix concatenation. For example, if you want to combine a single axis rotation with a translation, just place the coefficients in the correct entries of the resulting matrix. + * + * @param m is the pointer to the 4x4 fixed-point matrix (see note below about format) + * @param p are the bit OR'd parameters to the matrix macro (@ref G_MTX_PROJECTION, @ref G_MTX_MODELVIEW, @ref G_MTX_MUL, @ref G_MTX_LOAD, @ref G_MTX_NOPUSH) + */ #define gSPMatrix(pkt, m, p) \ gDma2p((pkt),G_MTX, (m), sizeof(Mtx), (p) ^ G_MTX_PUSH, 0) +/** + * @brief macro which inserts a matrix operation in a static display list. + * + * @copydetails gSPMatrix + */ #define gsSPMatrix(m, p) \ gsDma2p( G_MTX, (m), sizeof(Mtx), (p) ^ G_MTX_PUSH, 0) +/** + * @brief macro which pops one of the matrix stacks at the end display list. + * + * It pops `num` of the matrix stacks. The model view stack can be up to 10 matrices deep. The projection stack is 1 matrix deep, so it cannot be popped. + * + * @note + * If the stack is empty, the macro is ignored. + * + * @param n is the flag field that identifies which matrix stack to pop: + * - @ref G_MTX_MODELVIEW pops the modeling/viewing matrix stack + * - @ref G_MTX_PROJECTION pops the projection matrix stack (NOT IMPLEMENTED) + * @param num is the number of matrices to pop + */ #define gSPPopMatrixN(pkt, n, num) gDma2p((pkt), G_POPMTX, (num) * 64, 64, 2, 0) +/** + * @brief macro which pops one of the matrix stacks in a static display list. + * + * @copydetails gSPPopMatrixN + */ #define gsSPPopMatrixN(n, num) gsDma2p( G_POPMTX, (num) * 64, 64, 2, 0) +/** + * @brief macro which pops one of the matrix stacks at the end display list. + * + * It pops one of the matrix stacks. The model view stack can be up to 10 matrices deep. The projection stack is 1 matrix deep, so it cannot be popped. + * + * @note + * If the stack is empty, the macro is ignored. + * + * @param n is the flag field that identifies which matrix stack to pop: + * - @ref G_MTX_MODELVIEW pops the modeling/viewing matrix stack + * - @ref G_MTX_PROJECTION pops the projection matrix stack (NOT IMPLEMENTED) + */ #define gSPPopMatrix(pkt, n) gSPPopMatrixN((pkt), (n), 1) +/** + * @brief macro which pops one of the matrix stacks in a static display list. + * + * @copydetails gSPPopMatrix + */ #define gsSPPopMatrix(n) gsSPPopMatrixN( (n), 1) -/* - * +--------+----+---+---+----+------+-+ - * G_VTX | cmd:8 |0000| n:8 |0000|v0+n:7|0| - * +-+---+--+----+---+---+----+------+-+ - * | |seg| address | - * +-+---+-----------------------------+ +/** + * @brief macro which loads an internal vertex buffer in the RSP with points that are used by @ref gSP1Triangle macros to generate polygons at the end display list. + * + * + * It loads an internal vertex buffer in the RSP with points that are used by @ref gSP1Triangle macros to generate polygons. This vertex cache can hold up to 56 vertices, and the vertex loading can begin at any entry (index) within the cache. The vertex coordinates (x,y,z) are encoded in signed 2's complement, 16-bit integers. The texture coordinates (s,t) are encoded in S10.5 format. A vertex either has a color or a normal (for shading). These values are 8-bit values. The colors and alphas are treated as 8-bit unsigned values (0-255), but the normals are treated as 8-bit signed values (-128 to 127). Therefore, the appropriate member of the union to use (.v. or .n.) depends on whether you are using colors or normals. + * + * Normal coordinates range from -1.0 to 1.0. A value of -1.0 is represented as -128, and a value of 1.0 is represented as 128, but because the maximum positive value of a signed byte is 127, a value of 1.0 can't really be represented. Therefore, 0.992 is the maximum representable positive value, which is good enough for this purpose. + * + * The flag value is used for the packed normals feature to store normals with octahedral encoding. + * + * The coordinates (x,y,z) are transformed using the current 4x4 projection and model view matrices, and (s,t) are transformed using the scale defined by gSPTexture. + * + * # Example + * To load vertex cache entry 2,3,4, use this code: + * ```c + * gSPVertex(glistp++, v, 3, 2); + * ``` + * + * @note + * Because the RSP geometry transformation engine uses a vertex list with triangle list architecture, it is quite powerful. A simple one-triangle macro retains least performance compared to @ref gSP2Triangles or the new 5 tris commands in EX3 (@ref gSPTriStrip, @ref gSPTriFan). + * + * @param v is the pointer to the vertex list (segment address) + * @param n is the number of vertices + * @param v0 is the load vertex by index vo(0~55) in vertex buffer */ #define gSPVertex(pkt, v, n, v0) \ _DW({ \ @@ -2246,6 +2230,11 @@ _DW({ \ _g->words.w1 = (unsigned int)(v); \ }) +/** + * @brief macro which loads an internal vertex buffer in the RSP with points that are used by gSP1Triangle macros to generate polygons in a static display list. + * + * @copydetails gSPVertex + */ #define gsSPVertex(v, n, v0) \ { \ (_SHIFTL(G_VTX, 24, 8) | \ @@ -2280,7 +2269,7 @@ _DW({ \ (((count) > 0 && ((count) % G_INPUT_BUFFER_CMDS) > 0) ? \ ((G_INPUT_BUFFER_CMDS - ((count) % G_INPUT_BUFFER_CMDS)) << 3) : 0) -/* +/** * Optimization for reduced memory traffic. In count, put the estimated number * of DL commands in the target DL (the DL being called / jumped to, or the DL * being returned to, starting from the next command to be executed) up to and @@ -2290,32 +2279,62 @@ _DW({ \ * will be best if count is correct, and potentially worse than not specifying * count if it is wrong. * Feature suggested by Kaze Emanuar -*/ - + */ #define gSPDisplayListHint(pkt, dl, count) _gSPDisplayListRaw(pkt, dl, _DLHINTVALUE(count)) +/** + * @copydetails gSPDisplayListHint + */ #define gsSPDisplayListHint( dl, count) _gsSPDisplayListRaw( dl, _DLHINTVALUE(count)) +/** + * @copydetails gSPDisplayListHint + */ #define gSPBranchListHint(pkt, dl, count) _gSPBranchListRaw( pkt, dl, _DLHINTVALUE(count)) + +/** + * @copydetails gSPDisplayListHint + */ #define gsSPBranchListHint( dl, count) _gsSPBranchListRaw( dl, _DLHINTVALUE(count)) +/** + * @copydetails gSPDisplayListHint + */ #define gSPEndDisplayListHint(pkt, count) _gSPEndDisplayListRaw( pkt, _DLHINTVALUE(count)) + +/** + * @copydetails gSPDisplayListHint + */ #define gsSPEndDisplayListHint( count) _gsSPEndDisplayListRaw( _DLHINTVALUE(count)) -/* - * Normal control flow commands; same as above but with hint of 0 +/** + * Normal control flow commands; same as @ref gSPDisplayListHint but with hint of 0 */ - #define gSPDisplayList(pkt, dl) _gSPDisplayListRaw(pkt, dl, 0) +/** + * Normal control flow commands; same as @ref gsSPDisplayListHint but with hint of 0 + */ #define gsSPDisplayList( dl) _gsSPDisplayListRaw( dl, 0) +/** + * Normal control flow commands; same as @ref gSPBranchListHint but with hint of 0 + */ #define gSPBranchList(pkt, dl) _gSPBranchListRaw( pkt, dl, 0) +/** + * Normal control flow commands; same as @ref gsSPBranchListHint but with hint of 0 + */ #define gsSPBranchList( dl) _gsSPBranchListRaw( dl, 0) +/** + * Normal control flow commands; same as @ref gSPEndDisplayListHint but with hint of 0 + */ #define gSPEndDisplayList(pkt) _gSPEndDisplayListRaw( pkt, 0) +/** + * Normal control flow commands; same as @ref gsSPEndDisplayListHint but with hint of 0 + */ #define gsSPEndDisplayList( ) _gsSPEndDisplayListRaw( 0) -/* +/** * gSPLoadUcode RSP loads specified ucode. * * uc_start = ucode text section start @@ -2335,6 +2354,9 @@ _DW({ \ _g->words.w1 = (unsigned int)(uc_start); \ }) +/** + * @copydetails gSPLoadUcodeEx + */ #define gsSPLoadUcodeEx(uc_start, uc_dstart, uc_dsize) \ { \ _SHIFTL(G_RDPHALF_1, 24, 8), \ @@ -2358,7 +2380,7 @@ _DW({ \ gsSPLoadUcode( OS_K0_TO_PHYSICAL(& ucode##TextStart), \ OS_K0_TO_PHYSICAL(& ucode##DataStart)) -/* +/** * gSPDma_io DMA to/from DMEM/IMEM for DEBUG. */ #define gSPDma_io(pkt, flag, dmem, dram, size) \ @@ -2372,6 +2394,9 @@ _DW({ \ _g->words.w1 = (unsigned int)(dram); \ }) +/** + * @copydetails gSPDma_io + */ #define gsSPDma_io(flag, dmem, dram, size) \ { \ (_SHIFTL(G_DMA_IO, 24, 8) | \ @@ -2402,11 +2427,14 @@ _DW({ \ gDma0p(pkt, G_MEMSET, (dram), ((size) & 0xFFFFF0)); \ }) +/** + * @copydetails gSPMemset + */ #define gsSPMemset(pkt, dram, value, size) \ gsImmp1(G_RDPHALF_1, ((value) & 0xFFFF)), \ gsDma0p(G_MEMSET, (dram), ((size) & 0xFFFFF0)) -/* +/** * RSP short command (no DMA required) macros */ #define gImmp0(pkt, c) \ @@ -2416,6 +2444,9 @@ _DW({ \ _g->words.w0 = _SHIFTL((c), 24, 8); \ }) +/** + * @copydetails gImmp0 + */ #define gsImmp0(c) \ { \ _SHIFTL((c), 24, 8) \ @@ -2525,9 +2556,9 @@ _DW({ \ __gsSP1Triangle_w1(v3, v1, v2)) -/*** - *** 1 Triangle - ***/ +/** + * 1 Triangle + */ #define gSP1Triangle(pkt, v0, v1, v2, flag) \ _DW({ \ Gfx *_g = (Gfx *)(pkt); \ @@ -2535,6 +2566,9 @@ _DW({ \ __gsSP1Triangle_w1f(v0, v1, v2, flag)); \ _g->words.w1 = 0; \ }) +/** + * @copydetails gSP1Triangle + */ #define gsSP1Triangle(v0, v1, v2, flag) \ { \ (_SHIFTL(G_TRI1, 24, 8) | \ @@ -2542,9 +2576,9 @@ _DW({ \ 0 \ } -/*** - *** 1 Quadrangle - ***/ +/** + * 1 Quadrangle + */ #define gSP1Quadrangle(pkt, v0, v1, v2, v3, flag) \ _DW({ \ Gfx *_g = (Gfx *)(pkt); \ @@ -2553,6 +2587,9 @@ _DW({ \ _g->words.w1 = (__gsSP1Quadrangle_w2f(v0, v1, v2, v3, flag)); \ }) +/** + * @copydetails gSP1Quadrangle + */ #define gsSP1Quadrangle(v0, v1, v2, v3, flag) \ { \ (_SHIFTL(G_QUAD, 24, 8) | \ @@ -2560,9 +2597,9 @@ _DW({ \ __gsSP1Quadrangle_w2f(v0, v1, v2, v3, flag) \ } -/*** - *** 2 Triangles - ***/ +/** + * 2 Triangles + */ #define gSP2Triangles(pkt, v00, v01, v02, flag0, v10, v11, v12, flag1) \ _DW({ \ Gfx *_g = (Gfx *)(pkt); \ @@ -2571,6 +2608,9 @@ _DW({ \ _g->words.w1 = __gsSP1Triangle_w1f(v10, v11, v12, flag1); \ }) +/** + * @copydetails gSP2Triangles + */ #define gsSP2Triangles(v00, v01, v02, flag0, v10, v11, v12, flag1) \ { \ (_SHIFTL(G_TRI2, 24, 8) | \ @@ -2603,8 +2643,8 @@ _DW({ \ _SHIFTL((v5)*2, 16, 8) | \ _SHIFTL((v6)*2, 8, 8) | \ _SHIFTL((v7)*2, 0, 8)) \ -}) -/* +} +/** * 5 Triangles in strip arrangement. Draws the following tris: * v1-v2-v3, v3-v2-v4, v3-v4-v5, v5-v4-v6, v5-v6-v7 * If you want to draw fewer tris, set indices to -1 from the right. @@ -2616,15 +2656,21 @@ _DW({ \ */ #define gSPTriStrip(pkt, v1, v2, v3, v4, v5, v6, v7) \ _gSP5Triangles(pkt, G_TRISTRIP, v1, v2, v3, v4, v5, v6, v7) +/** + * @copydetails gSPTriStrip + */ #define gsSPTriStrip(v1, v2, v3, v4, v5, v6, v7) \ _gsSP5Triangles(G_TRISTRIP, v1, v2, v3, v4, v5, v6, v7) -/* +/** * 5 Triangles in fan arrangement. Draws the following tris: * v1-v2-v3, v1-v3-v4, v1-v4-v5, v1-v5-v6, v1-v6-v7 * Otherwise works the same as SPTriStrip, see above. */ #define gSPTriFan(pkt, v1, v2, v3, v4, v5, v6, v7) \ _gSP5Triangles(pkt, G_TRIFAN, v1, v2, v3, v4, v5, v6, v7) +/** + * @copydetails gSPTriFan + */ #define gsSPTriFan(v1, v2, v3, v4, v5, v6, v7) \ _gsSP5Triangles(G_TRIFAN, v1, v2, v3, v4, v5, v6, v7) @@ -2632,30 +2678,54 @@ _DW({ \ /* * Moveword commands */ -/* not strictly a moveword command anymore */ +#ifdef F3DEX2_SEGMENTS +/* Use F3DEX2 style segment setup binary encoding. F3DEX3 supports both the +F3DEX2 encoding and the F3DEX3 encoding, but the former does not have the +relative segment resolution behavior. */ +#define gSPSegment(pkt, segment, base) \ + gMoveWd(pkt, G_MW_SEGMENT, (segment) * 4, (base)) +#define gsSPSegment(segment, base) \ + gsMoveWd( G_MW_SEGMENT, (segment) * 4, (base)) +#else +/* F3DEX3 style segment setup, which resolves segment addresses relative to +other segments. */ #define gSPSegment(pkt, segment, base) \ gDma1p((pkt), G_RELSEGMENT, (base), ((segment) * 4) & 0xFFF, G_MW_SEGMENT) #define gsSPSegment(segment, base) \ gsDma1p( G_RELSEGMENT, (base), ((segment) * 4) & 0xFFF, G_MW_SEGMENT) +#endif #define gSPPerspNormalize(pkt, s) gMoveHalfwd(pkt, G_MW_FX, G_MWO_PERSPNORM, (s)) #define gsSPPerspNormalize(s) gsMoveHalfwd( G_MW_FX, G_MWO_PERSPNORM, (s)) -/* - * Clipping Macros - Deprecated, encodes SP no-ops - * It is not possible to change the clip ratio from 2 in F3DEX3. +/** + * @brief Clipping Macros + * @deprecated + * encodes SP no-ops it is not possible to change the clip ratio from 2 in F3DEX3. */ #define gSPClipRatio(pkt, r) gSPNoOp(pkt) +/** + * @brief @copybrief gSPClipRatio + * @deprecated + * @copydetails gSPClipRatio + */ #define gsSPClipRatio(r) gsSPNoOp() -/* - * Load new MVP matrix directly. +/** + * @brief Load new MVP matrix directly. + * * This is no longer supported as there is no MVP matrix in F3DEX3. + * @deprecated */ #define gSPForceMatrix(pkt, mptr) gSPNoOp(pkt) +/** + * @brief Load new MVP matrix directly. + * + * @copydetails gSPForceMatrix + */ #define gsSPForceMatrix(mptr) gsSPNoOp() -/* +/** * Ambient occlusion * Enabled with the G_AMBOCCLUSION bit in geometry mode. * Each of these factors sets how much ambient occlusion affects lights of @@ -2690,12 +2760,26 @@ _DW({ \ * lights * - To allow the lighting to be adjusted at the scene level on-the-fly */ - #define gSPAmbOcclusionAmb(pkt, amb) gMoveHalfwd(pkt, G_MW_FX, G_MWO_AO_AMBIENT, amb) +/** + * @copydetails gSPAmbOcclusionAmb + */ #define gsSPAmbOcclusionAmb(amb) gsMoveHalfwd( G_MW_FX, G_MWO_AO_AMBIENT, amb) +/** + * @copydetails gSPAmbOcclusionAmb + */ #define gSPAmbOcclusionDir(pkt, dir) gMoveHalfwd(pkt, G_MW_FX, G_MWO_AO_DIRECTIONAL, dir) +/** + * @copydetails gSPAmbOcclusionAmb + */ #define gsSPAmbOcclusionDir(dir) gsMoveHalfwd( G_MW_FX, G_MWO_AO_DIRECTIONAL, dir) +/** + * @copydetails gSPAmbOcclusionAmb + */ #define gSPAmbOcclusionPoint(pkt, point) gMoveHalfwd(pkt, G_MW_FX, G_MWO_AO_POINT, point) +/** + * @copydetails gSPAmbOcclusionAmb + */ #define gsSPAmbOcclusionPoint(point) gsMoveHalfwd( G_MW_FX, G_MWO_AO_POINT, point) #define gSPAmbOcclusionAmbDir(pkt, amb, dir) \ @@ -2720,7 +2804,7 @@ _DW({ \ gsSPAmbOcclusionAmbDir(amb, dir), \ gsSPAmbOcclusionPoint(point) -/* +/** * Fresnel - Feature suggested by thecozies * Enabled with the G_FRESNEL bit in geometry mode. * The dot product between a vertex normal and the vector from the vertex to the @@ -2755,44 +2839,54 @@ _DW({ \ */ #define gSPFresnelScale(pkt, scale) \ gMoveHalfwd(pkt, G_MW_FX, G_MWO_FRESNEL_SCALE, scale) +/** + * @copydetails gSPFresnelScale + */ #define gsSPFresnelScale(scale) \ gsMoveHalfwd(G_MW_FX, G_MWO_FRESNEL_SCALE, scale) +/** + * @copydetails gSPFresnelScale + */ #define gSPFresnelOffset(pkt, offset) \ gMoveHalfwd(pkt, G_MW_FX, G_MWO_FRESNEL_OFFSET, offset) +/** + * @copydetails gSPFresnelScale + */ #define gsSPFresnelOffset(offset) \ gsMoveHalfwd(G_MW_FX, G_MWO_FRESNEL_OFFSET, offset) +/** + * @copydetails gSPFresnelScale + */ #define gSPFresnel(pkt, scale, offset) \ gMoveWd(pkt, G_MW_FX, G_MWO_FRESNEL_SCALE, \ (_SHIFTL((scale), 16, 16) | _SHIFTL((offset), 0, 16))) +/** + * @copydetails gSPFresnelScale + */ #define gsSPFresnel(scale, offset) \ gsMoveWd(G_MW_FX, G_MWO_FRESNEL_SCALE, \ (_SHIFTL((scale), 16, 16) | _SHIFTL((offset), 0, 16))) -/* +/** * Attribute offsets - * These are added to ST or Z values after vertices are loaded and transformed. - * They are all s16s. - * For ST, the addition is after the multiplication for ST scale in SPTexture. - * For Z, this simply adds to the Z offset from the viewport. - * Whether each feature is enabled or disabled at a given time is determined - * by the G_ATTROFFSET_ST_ENABLE and G_ATTROFFSET_Z_ENABLE bits respectively in - * the geometry mode. - * Normally you would use ST offsets for UV scrolling, and you would use a Z - * offset of -2 (which it is set to by default) to fix decal mode. For the - * latter, enable the Z offset and set the Z mode to opaque. + * These are added to ST values after vertices are loaded and transformed. + * The values are s16s. The addition is after the multiplication for ST scale in + * SPTexture. Whether it is enabled or disabled at a given time is determined + * by the G_ATTROFFSET_ST_ENABLE bit in the geometry mode. Normally you would + * use ST offsets for UV scrolling. */ #define gSPAttrOffsetST(pkt, s, t) \ gMoveWd(pkt, G_MW_FX, G_MWO_ATTR_OFFSET_S, \ (_SHIFTL((s), 16, 16) | _SHIFTL((t), 0, 16))) +/** + * @copydetails gSPAttrOffsetST + */ #define gsSPAttrOffsetST(s, t) \ gsMoveWd(G_MW_FX, G_MWO_ATTR_OFFSET_S, \ (_SHIFTL((s), 16, 16) | _SHIFTL((t), 0, 16))) -#define gSPAttrOffsetZ(pkt, z) \ - gMoveHalfwd(pkt, G_MW_FX, G_MWO_ATTR_OFFSET_Z, z) -#define gsSPAttrOffsetZ(z) \ - gsMoveHalfwd(G_MW_FX, G_MWO_ATTR_OFFSET_Z, z) -/* + +/** * Alpha compare culling. Optimization for cel shading, could also be used for * other scenarios where lots of tris are being drawn with alpha compare. * @@ -2831,11 +2925,14 @@ _DW({ \ #define gSPAlphaCompareCull(pkt, mode, thresh) \ gMoveHalfwd(pkt, G_MW_FX, G_MWO_ALPHA_COMPARE_CULL, \ (_SHIFTL((mode), 8, 8) | _SHIFTL((thresh), 0, 8))) +/** + * @copydetails gSPAlphaCompareCull + */ #define gsSPAlphaCompareCull(mode, thresh) \ gsMoveHalfwd(G_MW_FX, G_MWO_ALPHA_COMPARE_CULL, \ (_SHIFTL((mode), 8, 8) | _SHIFTL((thresh), 0, 8))) -/* +/** * Normals mode: How to handle transformation of vertex normals from model to * world space for lighting. * @@ -2872,10 +2969,13 @@ _DW({ \ */ #define gSPNormalsMode(pkt, mode) \ gMoveHalfwd(pkt, G_MW_FX, G_MWO_NORMALS_MODE, (mode) & 0xFF) +/** + * @copydetails gSPNormalsMode + */ #define gsSPNormalsMode(mode) \ gsMoveHalfwd(G_MW_FX, G_MWO_NORMALS_MODE, (mode) & 0xFF) -/* +/** * F3DEX3 has a basic auto-batched rendering system. At a high level, if a * material display list being run is the same as the last material, the texture * loads are automatically skipped the second time as they should already be in @@ -2889,7 +2989,8 @@ _DW({ \ * * Internally, a material is defined to start with any set image command, and * end on any of the following: call, branch, return, vertex, all tri commands, - * modify vertex, branch Z/W, or cull. The physical address of the display list + * tex/fill rectangles, and successes on cull or branch w/z (which are usually + * preceded by vertex loads anyway). The physical address of the display list * --not the address of the image--is stored when a material is started. If a * material starts and its physical address is the same as the stored last start * address, i.e. we're executing the same material display list as the last @@ -2904,18 +3005,21 @@ _DW({ \ */ #define gSPDontSkipTexLoadsAcross(pkt) \ gMoveWd(pkt, G_MW_FX, G_MWO_LAST_MAT_DL_ADDR, 0xFFFFFFFF) +/** + * @copydetails gSPDontSkipTexLoadsAcross + */ #define gsSPDontSkipTexLoadsAcross() \ gsMoveWd(G_MW_FX, G_MWO_LAST_MAT_DL_ADDR, 0xFFFFFFFF) typedef union { struct { - s16 intPart[3][4]; /* Fourth row containing translations is omitted. */ - u16 fracPart[3][4]; /* Also the fourth column data is ignored, need not be 0. */ + s16 intPart[3][4]; /** Fourth row containing translations is omitted. */ + u16 fracPart[3][4]; /** Also the fourth column data is ignored, need not be 0. */ }; long long int force_structure_alignment; } MITMtx; -/* +/** * See SPNormalsMode. mtx is the address of a MITMtx (M inverse transpose). * * The matrix values must be scaled down so that the matrix norm is <= 1, @@ -2930,16 +3034,61 @@ typedef union { */ #define gSPMITMatrix(pkt, mit) \ gDma2p((pkt), G_MOVEMEM, (mit), sizeof(MITMtx), G_MV_MMTX, 0x80) +/** + * @copydetails gSPMITMatrix + */ #define gsSPMITMatrix(mtx) \ gsDma2p( G_MOVEMEM, (mit), sizeof(MITMtx), G_MV_MMTX, 0x80) -/* - * Insert values into Vertices +/** + * @brief You can use this macro to modify certain sections of a vertex after it has been sent to the RSP (by the gSPVertex macro). * - * vtx = vertex number 0-55 - * where = which element of point to modify (byte offset into vertex) - * num = new value (32 bit) + * This is an advanced macro. You need a good understanding of how vertices work in the RSP microcode before you use this macro (refer to gSPVertex). + * + * You can use this macro to modify certain sections of a vertex after it has been sent to the RSP (by the gSPVertex macro). This is useful for vertices that are shared between two or more triangles that must have different properties when associated with one triangle versus the other triangle. + * + * For example, you might have two adjacent triangles that both need smooth-shaded color, but one is smooth-shaded red-to-yellow and the other is smooth-shaded green-to-cyan. In this case, the vertex that is shared by both triangles is sent with red/yellow color by using the gSPVertex macro. The first triangle is drawn. Then, the gSPModifyVertex macro is used to change the color to green/cyan, and the second triangle is drawn. + + * The primary use of the gSPModifyVertex macro is to modify the texture coordinate of a vertex so that a vertex that is shared by two triangles with different textures and different texture coordinate spaces can contain the texture coordinate for the first texture and then be modified to contain the texture coordinate for the second texture. + * + * It is faster to use the gSPModifyVertex macro than to send a new vertex macro with a different but similar vertex because no transformations or lighting are done to the vertex when you use the gSPModifyVertex macro. + * + * The where argument specifies which part of the vertex is to be modified. It can hold one of the following values: + * - @ref G_MWO_POINT_RGBA - @copybrief G_MWO_POINT_RGBA + * - @ref G_MWO_POINT_ST - @copybrief G_MWO_POINT_ST + * - @ref G_MWO_POINT_XYSCREEN - @copybrief G_MWO_POINT_XYSCREEN + * - @ref G_MWO_POINT_ZSCREEN - @copybrief G_MWO_POINT_ZSCREEN + * + * @note + * Lighting is not performed after a gSPModifyVertex macro, so modifying the color of the vertex with @ref G_MWO_POINT_RGBA is just that - modifying the actual color that will be output. It is not a modification of normal values. This means it cannot be used to update vertex normals for lighting. + * + * The S and T coordinates supplied in the gSPModifyVertex macro are never multiplied by the texture scale (from the gSPTexture macro), so you must pre-scale them before sending them. For example, if you want a texture scale of 1/2 (0x8000), make the S and T values sent with the gSPModifyVertex macro half the value of the equivalent values used with the gSPVertex macro. + * + * # Example + * To share a vertex between two triangles with different textures and texture coordinates, use this code: + * ```c + * // load vertex by gSPVertex + * gSPVertex(...); + * // load texture of triangle 1 + * gDPLoadTextureBlock(...); + * + * // draw triangle 1 using vertex #3 + * gSP1Triangle(glistp++, 1,2,3,0); + * + * // change a value of vertex 3 to S=3.0 and T=2.5 + * gSPModifyVertex(glistp++, 3, G_MWO_POINT_ST, 0x00600050); + * + * // load texture of triangle 2 + * gDPLoadTextureBlock(...); + * + * // draw triangle 2 using vertex #3 + * gSP1Triangle(glistp++, 1,2,3,0); + * ``` + * + * @param vtx specifies which of the RSP's vertices (0-55) to modify + * @param where specifies which part of the vertex to modify (@ref G_MWO_POINT_RGBA, @ref G_MWO_POINT_ST, @ref G_MWO_POINT_XYSCREEN or @ref G_MWO_POINT_ZSCREEN) + * @param val is the new value for the part of the vertex to be modified (a 32 bit integer number) */ # define gSPModifyVertex(pkt, vtx, where, val) \ _DW({ \ @@ -2950,6 +3099,11 @@ _DW({ \ _SHIFTL((vtx) * 2, 0, 16)); \ _g->words.w1 = (unsigned int)(val); \ }) +/** + * @brief You can use this macro to modify certain sections of a vertex after it has been sent to the RSP (by the gSPVertex macro). + * + * @copydetails gSPModifyVertex + */ # define gsSPModifyVertex(vtx, where, val) \ { \ (_SHIFTL(G_MODIFYVTX, 24, 8) | \ @@ -2962,7 +3116,7 @@ _DW({ \ * Display list optimization / object culling */ -/* +/** * Cull the display list based on screen clip flags of range of loaded verts. * Executes SPEndDisplayList if the convex hull formed by the specified range of * already-loaded vertices is offscreen. @@ -2975,7 +3129,9 @@ _DW({ \ _SHIFTL((vstart) * 2, 0, 16)); \ _g->words.w1 = _SHIFTL((vend) * 2, 0, 16); \ }) - +/** + * @copydetails gSPCullDisplayList + */ #define gsSPCullDisplayList(vstart,vend) \ { \ (_SHIFTL(G_CULLDL, 24, 8) | \ @@ -3047,7 +3203,7 @@ _DW({ \ #define gsSPBranchLessZ(dl, vtx, zval, near, far, flag) \ gsSPBranchLessZrg(dl, vtx, zval, near, far, flag, 0, G_MAXZ) -/* +/** * gSPBranchLessZraw Branch DL if (vtx.z) less than or equal (raw zval). * * dl = DL branch to @@ -3069,6 +3225,9 @@ _DW({ \ _g->words.w1 = (unsigned int)(zval); \ }) +/** + * @copydetails gSPBranchLessZraw + */ #define gsSPBranchLessZraw(dl, vtx, zval) \ { \ _SHIFTL(G_RDPHALF_1, 24, 8), \ @@ -3102,12 +3261,15 @@ _DW({ \ #define NUMLIGHTS_8 8 #define NUMLIGHTS_9 9 -/* +/** * Number of directional / point lights, in the range 0-9. There is also always * one ambient light not counted in this number. */ #define gSPNumLights(pkt, n) \ gMoveWd(pkt, G_MW_NUMLIGHT, G_MWO_NUMLIGHT, NUML(n)) +/** + * @copydetails gSPNumLights + */ #define gsSPNumLights(n) \ gsMoveWd( G_MW_NUMLIGHT, G_MWO_NUMLIGHT, NUML(n)) @@ -3123,8 +3285,10 @@ _DW({ \ #define LIGHT_9 9 #define LIGHT_10 10 -/* - * l should point to a Light or PosLight struct. +#define _LIGHT_TO_OFFSET(n) (((n) - 1) * 0x10 + 0x10) /* The + 0x10 skips cam pos and lookat */ + +/** + * l should point to a Light struct. * n should be an integer 1-9 to load lights 0-8. * Can also load Ambient lights to lights 0-8 with this. However, if you have * 9 directional / point lights, you must use SPAmbient to load light 9 @@ -3134,22 +3298,27 @@ _DW({ \ * New code should not generally use SPLight, and instead use SPSetLights to set * all lights in one memory transaction. */ -#define _LIGHT_TO_OFFSET(n) (((n) - 1) * 0x10 + 0x10) /* The + 0x10 skips cam pos and lookat */ #define gSPLight(pkt, l, n) \ gDma2p((pkt), G_MOVEMEM, (l), sizeof(Light), G_MV_LIGHT, _LIGHT_TO_OFFSET(n)) +/** + * @copydetails gSPLight + */ #define gsSPLight(l, n) \ gsDma2p( G_MOVEMEM, (l), sizeof(Light), G_MV_LIGHT, _LIGHT_TO_OFFSET(n)) -/* +/** * l should point to an Ambient struct. * n should be an integer 1-10 to load lights 0-9. */ #define gSPAmbient(pkt, l, n) \ gDma2p((pkt), G_MOVEMEM, (l), sizeof(Ambient), G_MV_LIGHT, _LIGHT_TO_OFFSET(n)) +/** + * @copydetails gSPAmbient + */ #define gsSPAmbient(l, n) \ gsDma2p( G_MOVEMEM, (l), sizeof(Ambient), G_MV_LIGHT, _LIGHT_TO_OFFSET(n)) -/* +/** * gSPLightColor changes the color of a directional light without an additional * DMA transfer. * col is a 32 bit word where (col >> 24) & 0xFF is red, (col >> 16) & 0xFF is @@ -3162,6 +3331,9 @@ _DW({ \ gMoveWd(pkt, G_MW_LIGHTCOL, ((((n) - 1) * 0x10) + 0), ((col) & 0xFFFFFF00)); \ gMoveWd(pkt, G_MW_LIGHTCOL, ((((n) - 1) * 0x10) + 4), ((col) & 0xFFFFFF00)); \ }) +/** + * @copydetails gSPLightColor + */ #define gsSPLightColor(n, col) \ gsMoveWd(G_MW_LIGHTCOL, ((((n) - 1) * 0x10) + 0), ((col) & 0xFFFFFF00)), \ gsMoveWd(G_MW_LIGHTCOL, ((((n) - 1) * 0x10) + 4), ((col) & 0xFFFFFF00)) @@ -3181,21 +3353,21 @@ _DW({\ gsMoveWd(G_MW_LIGHTCOL, ((((n) - 1) * 0x10) + 4), col2) -/* +/** * Set all your scene's lights (directional/point + ambient) with one memory * transaction. * n is the number of directional / point lights, from 0 to 9. There is also * always an ambient light. - * name should be the NAME of a Lights or PosLights struct (NOT A POINTER) + * name should be the NAME of a Lights struct (NOT A POINTER) * filled in with all the lighting data. You can use the gdSPDef* macros to fill * in the struct or just do it manually. Example: - * PosLights2 myLights; // 2 pos + 1 ambient + * Lights2 myLights; // 2 dir/pos + 1 ambient * * gSPSetLights(POLY_OPA_DISP++, 2, myLights); * * If you need to use a pointer, e.g. if the number of lights is variable at * runtime: - * PosLight *lights = memory_allocate((numLights + 1) * sizeof(PosLight)); + * Light *lights = memory_allocate((numLights + 1) * sizeof(Light)); * lights[0].p.pos = ...; * lights[1].l.dir = ...; * ... @@ -3210,6 +3382,9 @@ _DW({ \ gSPNumLights(pkt, n); \ gDma2p((pkt), G_MOVEMEM, &(name), (n) * 0x10 + 8, G_MV_LIGHT, 0x10); \ }) +/** + * @copydetails gSPSetLights + */ #define gsSPSetLights(n, name) \ gsSPNumLights(n), \ gsDma2p(G_MOVEMEM, &(name), (n) * 0x10 + 8, G_MV_LIGHT, 0x10) @@ -3217,7 +3392,11 @@ _DW({ \ #define gSPSetLights0(pkt, name) gSPSetLights(pkt, 0, name) #define gsSPSetLights0(name) gsSPSetLights( 0, name) #define gSPSetLights1(pkt, name) gSPSetLights(pkt, 1, name) +#ifdef KAZE_GBI_HACKS +#define gsSPSetLights1(name) gsSPNoOp() +#else #define gsSPSetLights1(name) gsSPSetLights( 1, name) +#endif #define gSPSetLights2(pkt, name) gSPSetLights(pkt, 2, name) #define gsSPSetLights2(name) gsSPSetLights( 2, name) #define gSPSetLights3(pkt, name) gSPSetLights(pkt, 3, name) @@ -3236,36 +3415,52 @@ _DW({ \ #define gsSPSetLights9(name) gsSPSetLights( 9, name) -/* +/** * Camera world position for Fresnel and specular lighting. Set this whenever * you set the VP matrix, viewport, etc. cam is the address of a PlainVtx struct. */ #define gSPCameraWorld(pkt, cam) \ gDma2p((pkt), G_MOVEMEM, (cam), sizeof(PlainVtx), G_MV_LIGHT, 0) +/** + * @copydetails gSPCameraWorld + */ #define gsSPCameraWorld(cam) \ gsDma2p( G_MOVEMEM, (cam), sizeof(PlainVtx), G_MV_LIGHT, 0) -/* +/** * Reflection/Hiliting Macros. * la is the address of a LookAt struct. */ #define gSPLookAt(pkt, la) \ gDma2p((pkt), G_MOVEMEM, (la), sizeof(LookAt), G_MV_LIGHT, 8) +/** + * @copydetails gSPLookAt + */ #define gsSPLookAt(la) \ gsDma2p( G_MOVEMEM, (la), sizeof(LookAt), G_MV_LIGHT, 8) -/* +/** * These versions are deprecated, please use g*SPLookAt. The two directions * cannot be set independently anymore as they both fit within one memory word. * (They could be set with moveword, but then the values would have to be within * the command itself, not at a memory address.) * This deprecated version has the X command set both (assuming l is the name / * address of a LookAt struct) and has the Y command as a SP no-op. + * @deprecated */ #define gSPLookAtX(pkt, l) gSPLookAt(pkt, l) +/** + * @copydetails gSPLookAtX + */ #define gsSPLookAtX(l) gsSPLookAt(l) +/** + * @copydetails gSPLookAtX + */ #define gSPLookAtY(pkt, l) gSPNoOp(pkt) +/** + * @copydetails gSPLookAtX + */ #define gsSPLookAtY(l) gsSPNoOp() @@ -3296,7 +3491,7 @@ _DW({ \ ((((height) - 1) * 4) + (hilite)->h.y2) & 0xFFF) -/* +/** * Set the occlusion plane. This is a quadrilateral in 3D space where all * geometry behind it is culled. You should create occlusion plane candidates * just behind walls and other large objects, and have your game engine pick @@ -3311,12 +3506,15 @@ _DW({ \ #define gSPOcclusionPlane(pkt, o) \ gDma2p((pkt), G_MOVEMEM, (o), sizeof(OcclusionPlane), G_MV_LIGHT, \ (G_MAX_LIGHTS * 0x10) + 0x18) +/** + * @copydetails gSPOcclusionPlane + */ #define gsSPOcclusionPlane(o) \ gsDma2p( G_MOVEMEM, (o), sizeof(OcclusionPlane), G_MV_LIGHT, \ (G_MAX_LIGHTS * 0x10) + 0x18) -/* +/** * FOG macros * fm = z multiplier * fo = z offset @@ -3333,6 +3531,9 @@ _DW({ \ gMoveWd(pkt, G_MW_FOG, G_MWO_FOG, \ (_SHIFTL(fm, 16, 16) | _SHIFTL(fo, 0, 16))) +/** + * @copydetails gSPFogFactor + */ #define gsSPFogFactor(fm, fo) \ gsMoveWd(G_MW_FOG, G_MWO_FOG, \ (_SHIFTL(fm, 16, 16) | _SHIFTL(fo, 0, 16))) @@ -3348,7 +3549,7 @@ _DW({ \ _SHIFTL(((500 - (min)) * 256 / ((max) - (min))), 0, 16))) -/* +/** * Macros to turn texture on/off */ #define gSPTexture(pkt, s, t, level, tile, on) \ @@ -3362,6 +3563,9 @@ _DW({ \ _g->words.w1 = (_SHIFTL((s), 16, 16) | \ _SHIFTL((t), 0, 16)); \ }) +/** + * @copydetails gSPTexture + */ #define gsSPTexture(s, t, level, tile, on) \ { \ (_SHIFTL(G_TEXTURE, 24, 8) | \ @@ -3372,16 +3576,19 @@ _DW({ \ _SHIFTL((t), 0, 16)) \ } -/* +/** * The bowtie value is a workaround for a bug in HW V1, and is not supported * by F3DEX2, let alone F3DEX3. */ #define gSPTextureL(pkt, s, t, level, bowtie, tile, on) \ gSPTexture(pkt, s, t, level, tile, on) +/** + * @copydetails gSPTextureL + */ #define gsSPTextureL(s, t, level, bowtie, tile, on) \ gsSPTexture(s, t, level, tile, on) -/* +/** * One gSPGeometryMode(pkt,c,s) GBI is equal to these two GBIs. * * gSPClearGeometryMode(pkt,c) @@ -3398,6 +3605,9 @@ _DW({ \ _g->words.w1 = (u32)(s); \ }) +/** + * @copydetails gSPGeometryMode + */ #define gsSPGeometryMode(c, s) \ { \ (_SHIFTL(G_GEOMETRYMODE, 24, 8) | \ @@ -3432,11 +3642,14 @@ _DW({ \ (unsigned int)(data) \ } -/* +/** * RDP setothermode register commands - register shadowed in RSP */ #define gDPPipelineMode(pkt, mode) \ gSPSetOtherMode(pkt, G_SETOTHERMODE_H, G_MDSFT_PIPELINE, 1, mode) +/** + * @copydetails gDPPipelineMode + */ #define gsDPPipelineMode(mode) \ gsSPSetOtherMode( G_SETOTHERMODE_H, G_MDSFT_PIPELINE, 1, mode) @@ -3490,12 +3703,17 @@ _DW({ \ #define gsDPSetAlphaDither(mode) \ gsSPSetOtherMode( G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 2, mode) -/* 'blendmask' is not supported anymore. +/** + * 'blendmask' is not supported anymore. * The bits are reserved for future use. * Fri May 26 13:45:55 PDT 1995 + * @deprecated */ -#define gDPSetBlendMask(pkt, mask) gDPNoOp(pkt) -#define gsDPSetBlendMask(mask) gsDPNoOp() +#define gDPSetBlendMask(pkt, mask) gSPNoOp(pkt) +/** + * @copydetails gDPSetBlendMask + */ +#define gsDPSetBlendMask(mask) gsSPNoOp() #define gDPSetAlphaCompare(pkt, type) \ gSPSetOtherMode(pkt, G_SETOTHERMODE_L, G_MDSFT_ALPHACOMPARE, 2, type) @@ -3622,7 +3840,7 @@ _DW({ \ G_ACMUX_##Ab1, G_ACMUX_##Ad1)) \ } -/* +/** * SetCombineMode macros are NOT redunant. It allow the C preprocessor * to substitute single parameter which includes commas in the token and * rescan for higher parameter count macro substitution. @@ -3631,8 +3849,10 @@ _DW({ \ * gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, TEXEL0, 0, SHADE, 0, * TEXEL0, 0, SHADE, 0, TEXEL0, 0, SHADE, 0) */ - #define gDPSetCombineMode(pkt, a, b) gDPSetCombineLERP(pkt, a, b) +/** + * @copydetails gDPSetCombineMode + */ #define gsDPSetCombineMode(a, b) gsDPSetCombineLERP( a, b) #define gDPSetColor(pkt, c, d) \ @@ -3666,8 +3886,13 @@ _DW({ \ #define gDPSetEnvColor(pkt, r, g, b, a) \ DPRGBColor(pkt, G_SETENVCOLOR, r, g, b, a) +#ifdef KAZE_GBI_HACKS +#define gsDPSetEnvColor(r, g, b, a) \ + gsSPNoOp() +#else #define gsDPSetEnvColor(r, g, b, a) \ sDPRGBColor( G_SETENVCOLOR, r, g, b, a) +#endif #define gDPSetBlendColor(pkt, r, g, b, a) \ DPRGBColor(pkt, G_SETBLENDCOLOR, r, g, b, a) @@ -3719,7 +3944,7 @@ _DW({ \ _SHIFTL(a, 0, 8)) \ } -/* +/** * Send the color of the specified light to one of the RDP's color registers. * light is the index of a light in the RSP counting from the end, i.e. 0 is * the ambient light, 1 is the last directional / point light, etc. The RGB @@ -3737,6 +3962,9 @@ _DW({ \ _SHIFTL(alpha, 0, 8)); \ _g->words.w1 = (word0); \ }) +/** + * @copydetails gSPLightToRDP + */ #define gsSPLightToRDP(light, alpha, word0) \ { \ (_SHIFTL(G_LIGHTTORDP, 24, 8) | \ @@ -3755,7 +3983,7 @@ _DW({ \ #define gsSPLightToFogColor(light, alpha) \ gsSPLightToRDP(light, alpha, _SHIFTL(G_SETFOGCOLOR, 24, 8)) -/* +/** * gDPSetOtherMode (This is for expert user.) * * This command makes all othermode parameters set. @@ -3792,6 +4020,9 @@ _DW({ \ _g->words.w1 = (unsigned int)(mode1); \ }) +/** + * @copydetails gDPSetOtherMode + */ #define gsDPSetOtherMode(mode0, mode1) \ { \ (_SHIFTL(G_RDPSETOTHERMODE, 24, 8) | \ @@ -4121,7 +4352,7 @@ _DW({ \ ((height) - 1) << G_TEXTURE_IMAGE_FRAC); \ }) -/* +/** * Allow tmem address and render tile to be specified. * The S at the end means odd lines are already word Swapped */ @@ -4207,7 +4438,7 @@ _DW({ ((height) - 1) << G_TEXTURE_IMAGE_FRAC); \ }) -/* +/** * allows tmem address and render tile to be specified */ #define gDPLoadMultiBlock(pkt, timg, tmem, rtile, fmt, siz, width, height, pal, \ @@ -4311,7 +4542,7 @@ _DW({ ((height) - 1) << G_TEXTURE_IMAGE_FRAC) -/* +/** * Allow tmem address and render_tile to be specified, useful when loading * mutilple tiles at a time. */ @@ -4332,7 +4563,7 @@ _DW({ ((width) - 1) << G_TEXTURE_IMAGE_FRAC, \ ((height) - 1) << G_TEXTURE_IMAGE_FRAC) -/* +/** * Allows tmem and render tile to be specified. Useful when loading * several tiles at a time. * @@ -4340,7 +4571,6 @@ _DW({ * See gDPLoadTextureBlockS() for reference. Basically, just don't * calculate DxT, use 0 */ - #define gsDPLoadMultiBlockS(timg, tmem, rtile, fmt, siz, width, height, pal, \ cms, cmt, masks, maskt, shifts, shiftt) \ gsDPSetTextureImage(fmt, siz##_LOAD_BLOCK, 1, timg), \ @@ -4399,7 +4629,7 @@ _DW({ ((height) - 1) << G_TEXTURE_IMAGE_FRAC); \ }) -/* +/** * 4-bit load block. Useful when loading multiple tiles */ #define gDPLoadMultiBlock_4b(pkt, timg, tmem, rtile, fmt, width, height, pal, \ @@ -4421,7 +4651,7 @@ _DW({ ((height) - 1) << G_TEXTURE_IMAGE_FRAC); \ }) -/* +/** * 4-bit load block. Allows tmem and render tile to be specified. Useful when * loading multiple tiles. The S means odd lines are already word swapped. */ @@ -4498,7 +4728,7 @@ _DW({ ((width) - 1) << G_TEXTURE_IMAGE_FRAC, \ ((height) - 1) << G_TEXTURE_IMAGE_FRAC) -/* +/** * 4-bit load block. Allows tmem address and render tile to be specified. * Useful when loading multiple tiles. */ @@ -4520,7 +4750,7 @@ _DW({ ((height)-1) << G_TEXTURE_IMAGE_FRAC) -/* +/** * 4-bit load block. Allows tmem address and render tile to be specified. * Useful when loading multiple tiles. S means odd lines are already swapped. */ @@ -4588,7 +4818,7 @@ _DW({ \ (lrt) << G_TEXTURE_IMAGE_FRAC); \ }) -/* +/** * Load texture tile. Allows tmem address and render tile to be specified. * Useful for loading multiple tiles. */ @@ -4641,7 +4871,7 @@ _DW({ \ (lrs) << G_TEXTURE_IMAGE_FRAC, \ (lrt) << G_TEXTURE_IMAGE_FRAC) -/* +/** * Load texture tile. Allows tmem address and render tile to be specified. * Useful for loading multiple tiles. */ @@ -4693,7 +4923,7 @@ _DW({ \ (lrt) << G_TEXTURE_IMAGE_FRAC); \ }) -/* +/** * Load texture tile. Allows tmem address and render tile to be specified. * Useful for loading multiple tiles. */ @@ -4745,9 +4975,8 @@ _DW({ \ (lrs) << G_TEXTURE_IMAGE_FRAC, \ (lrt) << G_TEXTURE_IMAGE_FRAC) -/* - * Load texture tile. Allows tmem address and render tile to be specified. - * Useful for loading multiple tiles. +/** + * @copydetails gDPLoadMultiTile_4b */ #define gsDPLoadMultiTile_4b(timg, tmem, rtile, fmt, width, height, \ uls, ult, lrs, lrt, pal, \ @@ -4773,13 +5002,12 @@ _DW({ \ (lrs) << G_TEXTURE_IMAGE_FRAC, \ (lrt) << G_TEXTURE_IMAGE_FRAC) -/* +/** * Load a 16-entry palette (for 4-bit CI textures) * Assumes a 16 entry tlut is being loaded, palette # is 0-15 * With NO_SYNCS_IN_TEXTURE_LOADS: assumes that palette 0 is for multitexture * texture 0 and palette 1 is for texture 1 (uses load tiles 5 and 4) */ - #define gDPLoadTLUT_pal16(pkt, pal, dram) \ _DW({ \ gDPSetTextureImage(pkt, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dram); \ @@ -4790,7 +5018,9 @@ _DW({ \ gDPLoadTLUTCmd(pkt, _G_PALLOADTILE((pal) & 1), 15); \ gDPPipeSyncInTexLoad(pkt); \ }) - +/** + * @copydetails gDPLoadTLUT_pal16 + */ #define gsDPLoadTLUT_pal16(pal, dram) \ gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dram), \ gsDPTileSyncInTexLoad \ @@ -4800,11 +5030,10 @@ _DW({ \ gsDPLoadTLUTCmd(_G_PALLOADTILE((pal) & 1), 15) \ gsDPPipeSyncEndOfTexLoad -/* +/** * Load a 256-entry palette (for 8-bit CI textures) * Assumes a 256 entry tlut is being loaded, palette # is not used */ - #define gDPLoadTLUT_pal256(pkt, dram) \ _DW({ \ gDPSetTextureImage(pkt, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dram); \ @@ -4816,6 +5045,9 @@ _DW({ \ gDPPipeSyncInTexLoad(pkt); \ }) +/** + * @copydetails gDPLoadTLUT_pal256 + */ #define gsDPLoadTLUT_pal256(dram) \ gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dram), \ gsDPTileSyncInTexLoad \ @@ -5028,7 +5260,8 @@ _DW({ \ (param) \ } -/* Notice that textured rectangles are 128-bit commands, therefore +/** + * Notice that textured rectangles are 128-bit commands, therefore * gsDPTextureRectangle() should not be used in display lists * under normal circumstances (use gsSPTextureRectangle()). * That is also why there is no gDPTextureRectangle() macros. @@ -5049,6 +5282,9 @@ _DW({ \ _SHIFTL(dtdy, 0, 16)) \ } +/** + * @copydetails gsDPTextureRectangle + */ #define gDPTextureRectangle(pkt, xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \ _DW({ \ Gfx *_g = (Gfx *)(pkt); \ @@ -5197,17 +5433,28 @@ _DW({ #define gDPWord(pkt, wordhi, wordlo) \ _DW({ \ Gfx *_g = (Gfx *)(pkt); \ - \ gImmp1(pkt, G_RDPHALF_1, (unsigned int)(wordhi)); \ gImmp1(pkt, G_RDPHALF_2, (unsigned int)(wordlo)); \ }) +#ifdef RISKY_RDP_SYNCS +/* + * The community has found that in nearly all instances, a tile sync is + * sufficient where a pipe sync is normally used--between rendering something + * and changing critical RDP settings. However, we are not 100% sure this is + * true for all obscure settings, so it is risky. +*/ +#define G_USEASPIPESYNC G_RDPTILESYNC +#else +#define G_USEASPIPESYNC G_RDPPIPESYNC +#endif + #define gDPFullSync(pkt) gDPNoParam(pkt, G_RDPFULLSYNC) #define gsDPFullSync() gsDPNoParam( G_RDPFULLSYNC) #define gDPTileSync(pkt) gDPNoParam(pkt, G_RDPTILESYNC) #define gsDPTileSync() gsDPNoParam( G_RDPTILESYNC) -#define gDPPipeSync(pkt) gDPNoParam(pkt, G_RDPPIPESYNC) -#define gsDPPipeSync() gsDPNoParam( G_RDPPIPESYNC) +#define gDPPipeSync(pkt) gDPNoParam(pkt, G_USEASPIPESYNC) +#define gsDPPipeSync() gsDPNoParam( G_USEASPIPESYNC) #define gDPLoadSync(pkt) gDPNoParam(pkt, G_RDPLOADSYNC) #define gsDPLoadSync() gsDPNoParam( G_RDPLOADSYNC) #define gDPNoOp(pkt) gDPNoParam(pkt, G_NOOP) diff --git a/include/ultra64/gbi.h b/include/ultra64/gbi.h index a368637b4..80c69492c 100644 --- a/include/ultra64/gbi.h +++ b/include/ultra64/gbi.h @@ -10,6 +10,10 @@ #define NO_SYNCS_IN_TEXTURE_LOADS #endif #include "gbi.f3dex3.h" + + // see `Error_please_update_viewport_Z_and_Y_see_GBI` + #undef G_MAXZ + #define G_MAXZ G_NEW_MAXZ #else #include "mbi.h" #include "ultratypes.h" diff --git a/spec/spec b/spec/spec index 89d83c9c1..562649217 100644 --- a/spec/spec +++ b/spec/spec @@ -892,82 +892,82 @@ endseg beginseg name "F3DEX3_BrW_Text" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW.code.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW.code.o" endseg beginseg name "F3DEX3_BrW_Data" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW.data.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW.data.o" endseg beginseg name "F3DEX3_BrW_PA_Text" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_PA.code.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_PA.code.o" endseg beginseg name "F3DEX3_BrW_PA_Data" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_PA.data.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_PA.data.o" endseg beginseg name "F3DEX3_BrW_PB_Text" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_PB.code.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_PB.code.o" endseg beginseg name "F3DEX3_BrW_PB_Data" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_PB.data.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_PB.data.o" endseg beginseg name "F3DEX3_BrW_PC_Text" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_PC.code.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_PC.code.o" endseg beginseg name "F3DEX3_BrW_PC_Data" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_PC.data.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_PC.data.o" endseg beginseg name "F3DEX3_BrW_NOC_Text" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_NOC.code.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_NOC.code.o" endseg beginseg name "F3DEX3_BrW_NOC_Data" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_NOC.data.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_NOC.data.o" endseg beginseg name "F3DEX3_BrW_NOC_PA_Text" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_NOC_PA.code.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_NOC_PA.code.o" endseg beginseg name "F3DEX3_BrW_NOC_PA_Data" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_NOC_PA.data.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_NOC_PA.data.o" endseg beginseg name "F3DEX3_BrW_NOC_PB_Text" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_NOC_PB.code.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_NOC_PB.code.o" endseg beginseg name "F3DEX3_BrW_NOC_PB_Data" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_NOC_PB.data.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_NOC_PB.data.o" endseg beginseg name "F3DEX3_BrW_NOC_PC_Text" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_NOC_PC.code.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_NOC_PC.code.o" endseg beginseg name "F3DEX3_BrW_NOC_PC_Data" compress - include "$(BUILD_DIR)/F3DEX3/F3DEX3_BrW_NOC_PC.data.o" + include "$(BUILD_DIR)/$(F3DEX3_DIR)/F3DEX3_BrW_NOC_PC.data.o" endseg #endif diff --git a/src/boot/idle.c b/src/boot/idle.c index ebc4aa6ad..b1c8162bd 100644 --- a/src/boot/idle.c +++ b/src/boot/idle.c @@ -152,7 +152,7 @@ void Idle_ThreadEntry(void* arg) { osViSetMode(&gViConfigMode); ViConfig_UpdateVi(true); osViBlack(true); - osViSwapBuffer((void*)0x803DA80); //! @bug Invalid vram address (probably intended to be 0x803DA800) + osViSwapBuffer((void*)(0x80400000 - SCREEN_WIDTH * SCREEN_HEIGHT * 2)); #endif osCreatePiManager(OS_PRIORITY_PIMGR, &gPiMgrCmdQueue, sPiMgrCmdBuff, ARRAY_COUNT(sPiMgrCmdBuff)); diff --git a/src/boot/z_locale.c b/src/boot/z_locale.c index a9e94f27d..b454aad9f 100644 --- a/src/boot/z_locale.c +++ b/src/boot/z_locale.c @@ -40,18 +40,20 @@ void Locale_Init(void) { osEPiReadIo(gCartHandle, 0x38, &sCartInfo.mediaFormat); osEPiReadIo(gCartHandle, 0x3C, &sCartInfo.regionInfo); + + countryCode = sCartInfo.countryCode; #endif - if (sCartInfo.countryCode == '\0') { + if (countryCode == '\0') { // Fix-up for region free header switch (osTvType) { case OS_TV_NTSC: case OS_TV_MPAL: - sCartInfo.countryCode = 'E'; + countryCode = 'E'; break; case OS_TV_PAL: - sCartInfo.countryCode = 'P'; + countryCode = 'P'; break; default: PRINTF("z_locale_init: Bad TV Type? (%u)\n", osTvType); @@ -60,7 +62,7 @@ void Locale_Init(void) { } } - switch (sCartInfo.countryCode) { + switch (countryCode) { #if !PLATFORM_IQUE case 'J': // "NTSC-J (Japan)" gCurrentRegion = REGION_JP; diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c index 1592a5065..6d05ee333 100644 --- a/src/boot/z_std_dma.c +++ b/src/boot/z_std_dma.c @@ -455,7 +455,6 @@ void DmaMgr_ProcessRequest(DmaRequest* req) { // Reduce the thread priority and decompress the file, the decompression routine handles the DMA // in chunks. Restores the thread priority when done. osSetThreadPri(NULL, THREAD_PRI_DMAMGR_LOW); - #if COMPRESS_YAZ Yaz0_Decompress(romStart, ram, romSize); #elif COMPRESS_LZO diff --git a/src/code/PreRender.c b/src/code/PreRender.c index 47bcb521d..0d6f5b169 100644 --- a/src/code/PreRender.c +++ b/src/code/PreRender.c @@ -838,7 +838,7 @@ void PreRender_ApplyFilters(PreRender* this) { } } -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED void PreRender_MotionBlurImpl(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, s32 envR, s32 envG, s32 envB, s32 envA) { Gfx* gfx = *gfxp; diff --git a/src/code/cutscene_manager.c b/src/code/cutscene_manager.c index 4b8b1ae94..07e5e1819 100644 --- a/src/code/cutscene_manager.c +++ b/src/code/cutscene_manager.c @@ -186,7 +186,7 @@ s16 CutsceneManager_MarkNextCutscenes(void) { s32 j; s32 count = 0; s16 csIdMax = CS_ID_NONE; - s16 priorityMax = SHT_MAX; // lower number means higher priority + s16 priorityMax = SDC_MAX; // lower number means higher priority s16 csId; s16 priority; diff --git a/src/code/fault_n64.c b/src/code/fault_n64.c index 2d31b0f32..7359f0440 100644 --- a/src/code/fault_n64.c +++ b/src/code/fault_n64.c @@ -446,173 +446,6 @@ OSThread* Fault_FindFaultedThread(void) { return NULL; } -void Fault_WaitForButtonCombo(void) { - Input* inputs = sFaultInputs; - s32 btnPress; - s32 btnCur; - OSTime comboStartTime; - s32 x; - s32 y; - s32 count; - s32 pad[4]; - - // "KeyWaitB (L R Z Up Down Up Down Left Left Right Right B A START)" - osSyncPrintf(VT_FGCOL(WHITE) T("KeyWaitB (LRZ ", "KeyWaitB (L R Z ") VT_FGCOL(WHITE) T("上", "Up ") - VT_FGCOL(YELLOW) T("下 ", "Down ") VT_FGCOL(YELLOW) T("上", "Up ") VT_FGCOL(WHITE) - T("下 ", "Down ") VT_FGCOL(WHITE) T("左", "Left ") VT_FGCOL(YELLOW) T("左 ", "Left ") - VT_FGCOL(YELLOW) T("右", "Right ") VT_FGCOL(WHITE) T("右 ", "Right ") VT_FGCOL(GREEN) - T("B", "B ") VT_FGCOL(BLUE) T("A", "A ") - VT_FGCOL(RED) "START" VT_FGCOL(WHITE) ")" VT_RST "\n"); - - x = 0; - y = 0; - count = 0; - while (x != 11) { - if ((count % 30) == 1) {} - if ((count % 30) == 0) { - Fault_DrawCornerRecYellow(); - } - count++; - - Fault_SleepImpl(1000 / 60); - PadMgr_RequestPadData(&gPadMgr, inputs, 0); - btnCur = inputs[0].cur.button; - btnPress = inputs[0].press.button; - if ((btnCur == 0) && (y == 1)) { - y = 0; - osSyncPrintf("x=%d y=%d\n", x, y); - } else if (btnPress != 0) { - if (y == 1) { - x = 0; - osSyncPrintf("x=%d y=%d\n", x, y); - } - switch (x) { - case 0: - if ((btnCur == (BTN_Z | BTN_L | BTN_R)) && (btnPress == BTN_Z)) { - x = 1; - y = 1; - comboStartTime = osGetTime(); - } - break; - - case 1: - if (btnPress == BTN_DUP) { - x = 2; - } else { - x = 0; - } - break; - - case 2: - if (btnPress == BTN_CDOWN) { - x = 3; - y = 1; - } else { - x = 0; - } - break; - - case 3: - if (btnPress == BTN_CUP) { - x = 4; - } else { - x = 0; - } - break; - - case 4: - if (btnPress == BTN_DDOWN) { - x = 5; - y = 1; - } else { - x = 0; - } - break; - - case 5: - if (btnPress == BTN_DLEFT) { - x = 6; - } else { - x = 0; - } - break; - - case 6: - if (btnPress == BTN_CLEFT) { - x = 7; - y = 1; - } else { - x = 0; - } - break; - - case 7: - if (btnPress == BTN_CRIGHT) { - x = 8; - } else { - x = 0; - } - break; - - case 8: - if (btnPress == BTN_DRIGHT) { - x = 9; - y = 1; - } else { - x = 0; - } - break; - - case 9: - if (btnPress == (BTN_A | BTN_B)) { - x = 10; - } else if (btnPress == BTN_A) { - x = 91; - } else if (btnPress == BTN_B) { - x = 92; - } else { - x = 0; - } - break; - - case 91: - if (btnPress == BTN_B) { - x = 10; - } else { - x = 0; - } - break; - - case 92: - if (btnPress == BTN_A) { - x = 10; - } else { - x = 0; - } - break; - - case 10: - if ((btnCur == (BTN_A | BTN_B | BTN_START)) && (btnPress == BTN_START)) { - f32 comboTimeSeconds = OS_CYCLES_TO_USEC(osGetTime() - comboStartTime) / 1000000.0f; - - osSyncPrintf(T("入力時間 %f 秒\n", "Input time %f seconds\n"), comboTimeSeconds); - if (comboTimeSeconds <= 50.0f) { - x = 11; - } else { - x = 0; - } - } else { - x = 0; - } - break; - - default: - break; - } - } - } -} - void func_800AF0E0(void) { s32 i; @@ -788,7 +621,6 @@ void Fault_ThreadEntry(void* arg0) { } Fault_SleepImpl(500); Fault_DrawCornerRecRed(); - Fault_WaitForButtonCombo(); do { func_800AF558(); Fault_PrintThreadContext(faultedThread); @@ -836,7 +668,6 @@ NORETURN void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2) { Fault_SleepImpl(1000); } Fault_SleepImpl(500); - Fault_WaitForButtonCombo(); do { func_800AF558(); Fault_DrawRecBlack(22, 16, 276, 34); diff --git a/src/code/graph.c b/src/code/graph.c index 4004a8dd1..c676a7e25 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -53,7 +53,7 @@ OSTime sGraphPrevTaskTimeStart; #define GRAPH_UCODE_GLOBAL_SYMBOL gspF3DZEX2_NoN_PosLight_fifoTextStart #endif -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED u16 (*gWorkBuf)[SCREEN_WIDTH * SCREEN_HEIGHT]; // pointer-to-array, array itself is allocated (see below) #endif @@ -146,13 +146,17 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) { THGA_Init(&gfxCtx->polyXlu, pool->polyXluBuffer, sizeof(pool->polyXluBuffer)); THGA_Init(&gfxCtx->overlay, pool->overlayBuffer, sizeof(pool->overlayBuffer)); THGA_Init(&gfxCtx->work, pool->workBuffer, sizeof(pool->workBuffer)); +#if DEBUG_FEATURES THGA_Init(&gfxCtx->debug, pool->debugBuffer, sizeof(pool->debugBuffer)); +#endif gfxCtx->polyOpaBuffer = pool->polyOpaBuffer; gfxCtx->polyXluBuffer = pool->polyXluBuffer; gfxCtx->overlayBuffer = pool->overlayBuffer; gfxCtx->workBuffer = pool->workBuffer; +#if DEBUG_FEATURES gfxCtx->debugBuffer = pool->debugBuffer; +#endif gfxCtx->curFrameBuffer = SysCfb_GetFbPtr(gfxCtx->fbIdx % 2); gfxCtx->unk_014 = 0; @@ -477,7 +481,7 @@ void Graph_ThreadEntry(void* arg0) { GameStateOverlay* nextOvl = &gGameStateOverlayTable[GAMESTATE_SETUP]; GameStateOverlay* ovl; -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED gWorkBuf = SYSTEM_ARENA_MALLOC(sizeof(*gWorkBuf) + 64 - 1, __FILE__, __LINE__); gWorkBuf = (void*)ALIGN64((u32)gWorkBuf); #endif diff --git a/src/code/sched.c b/src/code/sched.c index 39b2ce6a0..7bfc85e83 100644 --- a/src/code/sched.c +++ b/src/code/sched.c @@ -727,6 +727,10 @@ void Sched_Init(Scheduler* sc, void* stack, OSPri priority, u8 viModeType, UNK_T bzero(sc, sizeof(Scheduler)); sc->isFirstSwap = true; +#if ENABLE_PROFILER + Profiler_Init(); +#endif + // Create message queues for receiving interrupt events and tasks osCreateMesgQueue(&sc->interruptQueue, sc->interruptMsgBuf, ARRAY_COUNT(sc->interruptMsgBuf)); osCreateMesgQueue(&sc->cmdQueue, sc->cmdMsgBuf, ARRAY_COUNT(sc->cmdMsgBuf)); diff --git a/src/code/z_demo.c b/src/code/z_demo.c index c6c95d224..0068a5cce 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -1831,7 +1831,7 @@ void CutsceneCmd_Text(PlayState* play, CutsceneContext* csCtx, CsCmdText* cmd) { } void CutsceneCmd_MotionBlur(PlayState* play, CutsceneContext* csCtx, CsCmdMotionBlur* cmd) { - if (ENABLE_MOTION_BLUR) { + if (IS_MOTION_BLUR_ENABLED) { if ((csCtx->curFrame >= cmd->startFrame) && (cmd->endFrame >= csCtx->curFrame)) { f32 lerp = Environment_LerpWeight(cmd->endFrame, cmd->startFrame, csCtx->curFrame); diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index a334a63c6..e5369f094 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -1436,7 +1436,7 @@ void Environment_DrawSunAndMoon(PlayState* play) { G_AC_NONE | G_ZS_PIXEL | G_RM_FOG_PRIM_A | G_RM_XLU_SURF2), gsDPLoadTextureBlock(gMoonTex, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), - gsSPVertex(gMoonDL_04038F70_Vtx, 4, 0), + gsSPVertex(gMoonDL_04039410_Vtx, 4, 0), gsSP2Triangles(0, 1, 2, 0, 1, 3, 2, 0), gsSPEndDisplayList(), }; diff --git a/src/code/z_message.c b/src/code/z_message.c index be833e8a6..4e72ca2fe 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -4018,80 +4018,71 @@ void Message_DrawMain(PlayState* play, Gfx** p) { *p = gfx; } -#if DEBUG_FEATURES +#if IS_MSG_DEBUG_ENABLED /** * If the s16 variable pointed to by `var` changes in value, a black bar and white box * are briefly drawn onto the screen. It can only watch one variable per build due to * the last value being saved in a static variable. */ void Message_DrawDebugVariableChanged(s16* var, GraphicsContext* gfxCtx) { - if (IS_MSG_DEBUG_ENABLED) { - static s16 sVarLastValue = 0; - static s16 sFillTimer = 0; - s32 pad; + static s16 sVarLastValue = 0; + static s16 sFillTimer = 0; + s32 pad; - OPEN_DISPS(gfxCtx, "../z_message_PAL.c", 3485); + OPEN_DISPS(gfxCtx, "../z_message_PAL.c", 3485); - if (sVarLastValue != *var) { - sVarLastValue = *var; - sFillTimer = 30; - } - if (sFillTimer != 0) { - sFillTimer--; - gDPPipeSync(POLY_OPA_DISP++); - gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL); - gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(POLY_OPA_DISP++, GPACK_RGBA5551(0, 0, 0, 1) << 0x10 | GPACK_RGBA5551(0, 0, 0, 1)); - gDPFillRectangle(POLY_OPA_DISP++, 0, 110, SCREEN_WIDTH - 1, 150); // 40x319 black bar - gDPPipeSync(POLY_OPA_DISP++); - gDPPipeSync(POLY_OPA_DISP++); - gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL); - gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2); - gDPSetFillColor(POLY_OPA_DISP++, - GPACK_RGBA5551(255, 255, 255, 1) << 0x10 | GPACK_RGBA5551(255, 255, 255, 1)); - gDPFillRectangle(POLY_OPA_DISP++, 40, 120, 60, 140); // 20x20 white box - gDPPipeSync(POLY_OPA_DISP++); - } - CLOSE_DISPS(gfxCtx, "../z_message_PAL.c", 3513); + if (sVarLastValue != *var) { + sVarLastValue = *var; + sFillTimer = 30; } + if (sFillTimer != 0) { + sFillTimer--; + gDPPipeSync(POLY_OPA_DISP++); + gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL); + gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(POLY_OPA_DISP++, GPACK_RGBA5551(0, 0, 0, 1) << 0x10 | GPACK_RGBA5551(0, 0, 0, 1)); + gDPFillRectangle(POLY_OPA_DISP++, 0, 110, SCREEN_WIDTH - 1, 150); // 40x319 black bar + gDPPipeSync(POLY_OPA_DISP++); + gDPPipeSync(POLY_OPA_DISP++); + gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL); + gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2); + gDPSetFillColor(POLY_OPA_DISP++, GPACK_RGBA5551(255, 255, 255, 1) << 0x10 | GPACK_RGBA5551(255, 255, 255, 1)); + gDPFillRectangle(POLY_OPA_DISP++, 40, 120, 60, 140); // 20x20 white box + gDPPipeSync(POLY_OPA_DISP++); + } + CLOSE_DISPS(gfxCtx, "../z_message_PAL.c", 3513); } void Message_DrawDebugText(PlayState* play, Gfx** p) { - if (IS_MSG_DEBUG_ENABLED) { - s32 pad; - GfxPrint printer; - s32 pad1; + s32 pad; + GfxPrint printer; + s32 pad1; - GfxPrint_Init(&printer); - GfxPrint_Open(&printer, *p); - GfxPrint_SetPos(&printer, 6, 26); - GfxPrint_SetColor(&printer, 255, 60, 0, 255); - GfxPrint_Printf(&printer, "%s", "MESSAGE"); - GfxPrint_SetPos(&printer, 14, 26); - GfxPrint_Printf(&printer, "%s", "="); - GfxPrint_SetPos(&printer, 16, 26); - GfxPrint_Printf(&printer, "%x", play->msgCtx.textId); - *p = GfxPrint_Close(&printer); - GfxPrint_Destroy(&printer); - } + GfxPrint_Init(&printer); + GfxPrint_Open(&printer, *p); + GfxPrint_SetPos(&printer, 6, 26); + GfxPrint_SetColor(&printer, 255, 60, 0, 255); + GfxPrint_Printf(&printer, "%s", "MESSAGE"); + GfxPrint_SetPos(&printer, 14, 26); + GfxPrint_Printf(&printer, "%s", "="); + GfxPrint_SetPos(&printer, 16, 26); + GfxPrint_Printf(&printer, "%x", play->msgCtx.textId); + *p = GfxPrint_Close(&printer); + GfxPrint_Destroy(&printer); } #endif void Message_Draw(PlayState* play) { Gfx* plusOne; Gfx* polyOpaP; -#if OOT_VERSION < GC_US - s32 pad; -#endif -#if IS_MSG_DEBUG_ENABLED - s16 watchVar; -#endif OPEN_DISPS(play->state.gfxCtx, "../z_message_PAL.c", 3554); #if IS_MSG_DEBUG_ENABLED - watchVar = gSaveContext.save.info.scarecrowLongSongSet; + s16 watchVar = gSaveContext.save.info.scarecrowLongSongSet; + Message_DrawDebugVariableChanged(&watchVar, play->state.gfxCtx); + if (BREG(0) != 0 && play->msgCtx.textId != 0) { plusOne = Gfx_Open(polyOpaP = POLY_OPA_DISP); gSPDisplayList(OVERLAY_DISP++, plusOne); diff --git a/src/code/z_play.c b/src/code/z_play.c index eabc38816..70b86b453 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -253,7 +253,7 @@ void Play_Destroy(GameState* thisx) { this->state.gfxCtx->callback = NULL; this->state.gfxCtx->callbackParam = NULL; -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED Play_DestroyMotionBlur(); #endif @@ -452,7 +452,7 @@ void Play_Init(GameState* thisx) { KaleidoScopeCall_Init(this); Interface_Init(this); -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED Play_InitMotionBlur(this); #endif @@ -1170,7 +1170,7 @@ skip: Environment_Update(this, &this->envCtx, &this->lightCtx, &this->pauseCtx, &this->msgCtx, &this->gameOverCtx, this->state.gfxCtx); - if (ENABLE_MOTION_BLUR && ENABLE_MOTION_BLUR_DEBUG) { + if (IS_MOTION_BLUR_ENABLED && ENABLE_MOTION_BLUR_DEBUG) { // motion blur testing controls if (CHECK_BTN_ALL(this->state.input[0].press.button, BTN_DUP)) { R_MOTION_BLUR_ENABLED ^= 1; @@ -1205,10 +1205,11 @@ skip: s16 csId = optCsId >= 0 ? optCsId : 0; // check if the cutscene is the next on the queue, if it is play it, - // otherwise add it to the queue when the button L is pressed + // otherwise add it to the queue when the D-Left is pressed while L and Z are held if (CutsceneManager_IsNext(csId)) { CutsceneManager_Start(csId, &GET_PLAYER(this)->actor); - } else if (CHECK_BTN_ALL(this->state.input[0].press.button, BTN_L)) { + } else if (CHECK_BTN_ALL(this->state.input[0].cur.button, BTN_L | BTN_Z) && + CHECK_BTN_ALL(this->state.input[0].press.button, BTN_DLEFT)) { CutsceneManager_Queue(csId); } } @@ -1237,7 +1238,7 @@ void Play_DrawOverlayElements(PlayState* this) { } } -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED void PreRender_MotionBlurOpaque(PreRender* this, Gfx** gfxP); void PreRender_MotionBlur(PreRender* this, Gfx** gfxp, s32 alpha); @@ -1315,25 +1316,25 @@ void Play_DestroyMotionBlur(void) { #endif void Play_SetMotionBlurAlpha(u32 alpha) { -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED R_MOTION_BLUR_ALPHA = alpha; #endif } void Play_EnableMotionBlur(u32 alpha) { -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED R_MOTION_BLUR_ALPHA = alpha; R_MOTION_BLUR_ENABLED = true; #endif } void Play_DisableMotionBlur(void) { -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED R_MOTION_BLUR_ENABLED = false; #endif } -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED void Play_SetMotionBlurPriorityAlpha(u32 alpha) { R_MOTION_BLUR_PRIORITY_ALPHA = alpha; } @@ -1487,7 +1488,7 @@ void Play_Draw(PlayState* this) { R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_OFF; } -#if ENABLE_MOTION_BLUR +#if IS_MOTION_BLUR_ENABLED Play_DrawMotionBlur(this); #endif @@ -1661,7 +1662,7 @@ void Play_Draw(PlayState* this) { } Play_Draw_skip: - if (ENABLE_MOTION_BLUR && ENABLE_MOTION_BLUR_DEBUG) { + if (IS_MOTION_BLUR_ENABLED && ENABLE_MOTION_BLUR_DEBUG) { // motion blur testing display GfxPrint printer; Gfx* gfxRef; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 1b0fdb657..d50f3830c 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -2035,6 +2035,10 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject, viewport.vp.vscale[0] = viewport.vp.vtrans[0] = width * ((1 << 2) / 2); viewport.vp.vscale[1] = viewport.vp.vtrans[1] = height * ((1 << 2) / 2); +#if ENABLE_F3DEX3 + // see `Error_please_update_viewport_Z_and_Y_see_GBI` + viewport.vp.vscale[1] = -viewport.vp.vscale[1]; +#endif gSPViewport(POLY_OPA_DISP++, &viewport); guPerspective(perspMtx, &perspNorm, fovy, (f32)width / (f32)height, 10.0f, 4000.0f, 1.0f); diff --git a/src/code/z_scene.c b/src/code/z_scene.c index 0765dbc46..541989ec0 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -76,27 +76,8 @@ void Object_InitContext(PlayState* play, ObjectContext* objectCtx) { u32 spaceSize; s32 i; -#if ENABLE_HACKEROOT + // HackerOoT change: set a fixed allocation for the object heap spaceSize = OBJECT_BANK_SIZE; -#else - if (play2->sceneId == SCENE_HYRULE_FIELD) { - spaceSize = 1000 * 1024 - OBJECT_SPACE_ADJUSTMENT; - } else if (play2->sceneId == SCENE_GANON_BOSS) { - if (gSaveContext.sceneLayer != 4) { - spaceSize = 1150 * 1024 - OBJECT_SPACE_ADJUSTMENT; - } else { - spaceSize = 1000 * 1024 - OBJECT_SPACE_ADJUSTMENT; - } - } else if (play2->sceneId == SCENE_SPIRIT_TEMPLE_BOSS) { - spaceSize = 1050 * 1024 - OBJECT_SPACE_ADJUSTMENT; - } else if (play2->sceneId == SCENE_CHAMBER_OF_THE_SAGES) { - spaceSize = 1050 * 1024 - OBJECT_SPACE_ADJUSTMENT; - } else if (play2->sceneId == SCENE_GANONDORF_BOSS) { - spaceSize = 1050 * 1024 - OBJECT_SPACE_ADJUSTMENT; - } else { - spaceSize = 1000 * 1024 - OBJECT_SPACE_ADJUSTMENT; - } -#endif objectCtx->numEntries = objectCtx->numPersistentEntries = 0; objectCtx->mainKeepSlot = objectCtx->subKeepSlot = 0; diff --git a/src/code/z_view.c b/src/code/z_view.c index f6c740ed8..f07ba348c 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -38,7 +38,12 @@ void View_ViewportToVp(Vp* dest, Viewport* src) { s32 height = src->bottomY - src->topY; dest->vp.vscale[0] = width * 2; +#if ENABLE_F3DEX3 + // see `Error_please_update_viewport_Z_and_Y_see_GBI` + dest->vp.vscale[1] = -(height * 2); +#else dest->vp.vscale[1] = height * 2; +#endif dest->vp.vscale[2] = G_MAXZ / 2; dest->vp.vscale[3] = 0; dest->vp.vtrans[0] = ((src->leftX * 2) + width) * 2; diff --git a/src/compression/aplib.c b/src/compression/aplib.c index 9c199ba70..f62fa1237 100644 --- a/src/compression/aplib.c +++ b/src/compression/aplib.c @@ -12,6 +12,8 @@ */ #include "compression.h" +#if COMPRESS_APLIB + static struct decoder dec; /* block copy, with desired overlapping behavior */ @@ -218,3 +220,5 @@ void Aplib_Decompress(unsigned rom, unsigned char* dst, unsigned compSz) { dec.buf_end = dec.buf + sizeof(dec.buf); dst = aP_depack(dec.buf_end, dst); } + +#endif diff --git a/src/compression/lzo.c b/src/compression/lzo.c index 5fe4d19c3..eec8e3a08 100644 --- a/src/compression/lzo.c +++ b/src/compression/lzo.c @@ -1,5 +1,7 @@ #include "compression.h" +#if COMPRESS_LZO + /* adapted from lzo1x_d.ch */ /* negative indexing distance */ @@ -218,3 +220,5 @@ L_done: dec.buf_end = 0; #endif } + +#endif diff --git a/src/compression/yaz0.c b/src/compression/yaz0.c index d7877e5bd..a13752f0f 100644 --- a/src/compression/yaz0.c +++ b/src/compression/yaz0.c @@ -5,8 +5,10 @@ #include "ultra64.h" #include "dma.h" -#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:128" \ - "pal-1.1:128" +#if COMPRESS_YAZ + +#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ + "ntsc-1.2:128 pal-1.1:128" ALIGNED(16) u8 sYaz0DataBuffer[0x400]; u8* sYaz0DataBufferEnd; @@ -115,3 +117,5 @@ void Yaz0_Decompress(uintptr_t romStart, u8* dst, size_t size) { sYaz0DataBufferEnd = sYaz0DataBuffer + sizeof(sYaz0DataBuffer); Yaz0_DecompressImpl(Yaz0_FirstDMA(), dst); } + +#endif diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c index b9f372365..9f99453cd 100644 --- a/src/overlays/gamestates/ovl_select/z_select.c +++ b/src/overlays/gamestates/ovl_select/z_select.c @@ -30,6 +30,20 @@ #include "save.h" #include "sram.h" +#if PLATFORM_N64 +void func_80800AD0_unknown(MapSelectState* this, s32 arg1) { + if (D_80121212 != 0) { + n64dd_SetDiskVersion(1); + } +} + +void func_80800B08_unknown(MapSelectState* this, s32 arg1) { + if (D_80121212 != 0) { + n64dd_SetDiskVersion(0); + } +} +#endif + void MapSelect_Init(GameState* thisx) { MapSelectState* this = (MapSelectState*)thisx; u8 i; diff --git a/src/overlays/gamestates/ovl_select/z_select.h b/src/overlays/gamestates/ovl_select/z_select.h index 078152e38..9462267a9 100644 --- a/src/overlays/gamestates/ovl_select/z_select.h +++ b/src/overlays/gamestates/ovl_select/z_select.h @@ -2,6 +2,8 @@ #define Z_SELECT_H #include "config.h" +#include "versions.h" + #if PLATFORM_N64 #include "n64dd.h" #endif @@ -17,6 +19,11 @@ #include "z64play.h" #include "sfx.h" +#if PLATFORM_N64 +void func_80800AD0_unknown(MapSelectState* this, s32 arg1); +void func_80800B08_unknown(MapSelectState* this, s32 arg1); +#endif + static const char* sAgeLabels[] = { "Adult", "Child", diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index f7ac46f90..3e8c4ff8b 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -38,10 +38,10 @@ void ConsoleLogo_Calc(ConsoleLogoState* this) { #if !PLATFORM_GC if ((this->coverAlpha == 0) && (this->visibleDuration != 0)) { - this->unk_1D4--; + this->timer--; this->visibleDuration--; - if (this->unk_1D4 == 0) { - this->unk_1D4 = 400; + if (this->timer == 0) { + this->timer = 400; } } else { if (this->coverAlpha == 0 && this->visibleDuration != 0) { diff --git a/sym_info.py b/sym_info.py index 789e6fe6f..569cbc7bf 100755 --- a/sym_info.py +++ b/sym_info.py @@ -285,8 +285,8 @@ def sym_info_main(): "-v", "--version", dest="oot_version", - help="which version should be processed (default: hackeroot-mq)", - default="hackeroot-mq", + help="which version should be processed (default: ntsc-1.2)", + default="ntsc-1.2", ) parser.add_argument( "--build-dir", @@ -297,7 +297,7 @@ def sym_info_main(): ) args = parser.parse_args() - filename = f"oot-{args.oot_version}" if args.oot_version != "hackeroot-mq" else "hackeroot-mq" + filename = f"hackeroot-{args.oot_version}" if args.color == "never": colors = False @@ -340,13 +340,13 @@ def sym_info_main(): Path("expected") / "build" / args.oot_version - / f"oot-{args.oot_version}.map" + / f"hackeroot-{args.oot_version}.map" ) elf_path = ( Path("expected") / "build" / args.oot_version - / f"oot-{args.oot_version}.elf" + / f"hackeroot-{args.oot_version}.elf" ) if not map_path.exists(): diff --git a/tools/check_disasm_metadata_unksyms.py b/tools/check_disasm_metadata_unksyms.py index a1ddfb6d3..3b85eac5b 100755 --- a/tools/check_disasm_metadata_unksyms.py +++ b/tools/check_disasm_metadata_unksyms.py @@ -47,7 +47,7 @@ def main(): ) mapfile = mapfile_parser.mapfile.MapFile() - mapfile_path = Path(f"build/{version}/oot-{version}.map") + mapfile_path = Path(f"build/{version}/hackeroot-{version}.map") mapfile.readMapFile(mapfile_path) map_symbols = set() diff --git a/tools/data_extractor.py b/tools/data_extractor.py deleted file mode 100644 index 997ad52a6..000000000 --- a/tools/data_extractor.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/python3 - -import argparse - - -def extract(start: int, size: int, input: str, output: str): - """Extracts ``size`` bytes from ``input``, at offset ``start``, and writes it to ``output`` - - Parameters: - - ``start``: int, defines where to start reading the file - - ``size``: int, how many bytes to read from the file - - ``input``: str, path to the file to read - - ``output``: str, path to the file to write - """ - - with open(input, "rb") as file: - file.seek(start) - data = file.read(size) - - with open(output, "wb") as file: - file.write(data) - - -def main(): - parser = argparse.ArgumentParser(description="Extracts data from a file for HackerOoT.") - - parser.add_argument( - "--start", - dest="start", - help="Offset to the data (uses hex)", - required=True, - ) - - parser.add_argument( - "--size", - dest="size", - help="How much to read (uses hex)", - required=True, - ) - - parser.add_argument( - "--input", - dest="input", - help="Input file", - required=True, - ) - - parser.add_argument( - "--output", - dest="output", - help="Output file", - required=True, - ) - - args = parser.parse_args() - extract(int(args.start, 16), int(args.size, 16), args.input, args.output) - print("Data extracted successfully!") - - -if __name__ == "__main__": - main() diff --git a/tools/decompress_baserom.py b/tools/decompress_baserom.py index 571eb27b3..07ea66cf3 100755 --- a/tools/decompress_baserom.py +++ b/tools/decompress_baserom.py @@ -132,7 +132,7 @@ def byte_swap(file_content: bytearray) -> bytearray: def per_version_fixes(file_content: bytearray, version: str) -> bytearray: - if version in {"gc-eu-mq-dbg", "hackeroot-mq"}: + if version == "gc-eu-mq-dbg": # Strip the overdump, which consists of an area of 0xFF bytes (which may # be erased flash memory) and ROM data from an unrelated game print("Stripping overdump...") @@ -228,7 +228,7 @@ def main(): # Check to see if the ROM is a "vanilla" ROM str_hash = get_str_hash(file_content) - if version in {"gc-eu-mq-dbg", "hackeroot-mq"}: + if version == "gc-eu-mq-dbg": correct_str_hashes = decompressed_str_hashes else: correct_str_hashes = compressed_str_hashes diff --git a/tools/fix_bss.py b/tools/fix_bss.py index 743085cd1..399f53505 100755 --- a/tools/fix_bss.py +++ b/tools/fix_bss.py @@ -205,9 +205,9 @@ def get_file_pointers_worker(file: mapfile_parser.mapfile.File) -> list[Pointer] # Compare pointers between the baserom and the current build, returning a dictionary from # C files to a list of pointers into their BSS sections def compare_pointers(version: str) -> dict[Path, BssSection]: - mapfile_path = Path(f"build/{version}/oot-{version}.map") + mapfile_path = Path(f"build/{version}/hackeroot-{version}.map") base_path = Path(f"baseroms/{version}/baserom-decompressed.z64") - build_path = Path(f"build/{version}/oot-{version}.z64") + build_path = Path(f"build/{version}/hackeroot-{version}.z64") if not mapfile_path.exists(): raise FixBssException(f"Could not open {mapfile_path}") if not base_path.exists(): diff --git a/tools/gc_utility.py b/tools/gc_utility.py index c6d1943ab..31f341c5e 100755 --- a/tools/gc_utility.py +++ b/tools/gc_utility.py @@ -32,13 +32,13 @@ class DmaEntry: if __name__ == "__main__": parser = argparse.ArgumentParser(description="gamecube utility") - parser.add_argument("-v", "--version", help="OoT Version", default="hackeroot-mq") + parser.add_argument("-v", "--version", help="OoT Version", default="ntsc-1.2") parser.add_argument("-c", "--codec", help="Compression Codec", default="yaz") args = parser.parse_args() VERSION = args.version DMATABLE_PATH = f"build/{VERSION}/dmadata_table_spec.h" - ROM_PATH = f"build/{VERSION}/{'oot-' if VERSION != 'hackeroot-mq' else ''}{VERSION}-compressed{'-' + args.codec if VERSION == 'hackeroot-mq' else ''}.z64" + ROM_PATH = f"build/{VERSION}/hackeroot-{VERSION}-compressed-{args.codec}.z64" sceneFiles: list[DmaInfo] = [] otherFiles: list[DmaInfo] = [] allFiles: list[DmaInfo] = [] @@ -58,7 +58,7 @@ if __name__ == "__main__": entryName = dmaTable[i + 1].removeprefix("DEFINE_DMA_ENTRY(").removesuffix(")").split(", ")[0] sceneFiles.append(DmaInfo(entryName, i + 1)) - mapFile = f"oot-{VERSION}.map" if VERSION != "hackeroot-mq" else "hackeroot-mq.map" + mapFile = f"hackeroot-{VERSION}.map" BUILTMAP = Path("build") / VERSION / mapFile mapPath = BUILTMAP with Capturing() as stdout: diff --git a/tools/gdb_load_ovl.py b/tools/gdb_load_ovl.py index 470b9c7f0..f56ed5bef 100644 --- a/tools/gdb_load_ovl.py +++ b/tools/gdb_load_ovl.py @@ -48,7 +48,7 @@ def AddOverlaySymbols(overlay_table, index): # get full object-file path that contains the first symbol target_filename = gdb.lookup_symbol(target_func_name)[0].symtab.filename - obj_name = "build/hackeroot-mq/" + target_filename[:-1] + "o" + obj_name = "build/ntsc-1.2/" + target_filename[:-1] + "o" pattern = r'[^/]*$' matches = re.findall(pattern, obj_name) diff --git a/tools/mod_assets.py b/tools/mod_assets.py deleted file mode 100755 index ba3ef6815..000000000 --- a/tools/mod_assets.py +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env python3 - -""" -copies mod_assets into assets. assumes file is located at project root -""" - -import os -import shutil -import time -import glob -import typing as T -import argparse - -from pathlib import Path - - -allow_print = False -oot_version = "" - -def log(msg: str): - if allow_print: - print(f"[{__file__}]: {msg}") - - -def remove_stale_assets(root: str, copied_files: T.List[str], last_cache_time: int): - modified_times: T.Dict[str, int] = { - file: int(os.path.getmtime(file)) for file in copied_files - } - stale = [file for file, ts in modified_times.items() if ts > last_cache_time] - - if len(stale) == 0: - log(f"No stale assets since last build") - return - - removed_count = 0 - for file in stale: - rel = os.path.relpath(file, root) - pattern = os.path.join(root, "build", os.path.dirname(rel), "*") - for match in glob.glob(pattern, recursive=True): - os.remove(match) - removed_count += 1 - - log(f"Removed {removed_count} stale asset(s) from {root}") - - -def copy_all(root: str) -> T.List[str]: - src_root = os.path.join(root, "mod_assets") - dst_root = os.path.join(root, f"extracted/{oot_version}/assets") - copied_files: T.List[str] = [] - for src_dir, _, file_names in os.walk(src_root): - dst_dir = src_dir.replace(src_root, dst_root, 1) - Path(dst_dir).mkdir(parents=True, exist_ok=True) - for file_name in file_names: - src_file = os.path.join(src_dir, file_name) - dst_file = os.path.join(dst_dir, file_name) - shutil.copy2(src_file, dst_file) - copied_files.append(dst_file) - - log(f"Copied {len(copied_files)} file(s) from mod_assets") - return copied_files - - -def remove_stale_actors(root: str, last_cache_time: int): - actors_src_dir = os.path.join(root, "src", "overlays", "actors") - actors_build_dir = os.path.join(root, "build", "src", "overlays", "actors") - stale_directories = set() - for actor_dir, _, actor_files in os.walk(actors_src_dir): - for actor_file in actor_files: - modified_time = os.path.getmtime(os.path.join(actor_dir, actor_file)) - if modified_time > last_cache_time: - stale_directories.add(actor_dir) - - removed = 0 - for actor_dir in stale_directories: - overlay_name = os.path.split(actor_dir)[1] - build_path = os.path.join(actors_build_dir, overlay_name) - if os.path.exists(build_path): - log(f"Removing stale actor {overlay_name}") - shutil.rmtree(build_path) - removed += 1 - - if removed == 0: - log("No stale actors since last build") - else: - log(f"Removed {removed} total stale actors") - - -def update_cache_time(root: str) -> int: - build_dir = os.path.join(root, "build") - if not os.path.exists(build_dir): - os.mkdir(build_dir) - cache_file = os.path.join(build_dir, ".mod_assets_cache") - if os.path.exists(cache_file): - with open(cache_file) as fd: - last_time = int(fd.read().strip()) - else: - last_time = 0 - - with open(cache_file, "w") as fd: - fd.write(f"{int(time.time())}") - log(f"Updated {cache_file}") - return last_time - - -def remove_suffix(input_string, suffix): - if suffix and input_string.endswith(suffix): - return input_string[:-len(suffix)] - return input_string - - -def main(): - global allow_print - global oot_version - - parser = argparse.ArgumentParser(description="mod assets handler") - parser.add_argument("--oot-version", dest="oot_version", help="OOT game version", default="gc-eu-mq-dbg") - parser.add_argument("-v", "--verbose", help="shows prints", action="store_true") - args = parser.parse_args() - allow_print = args.verbose - oot_version = args.oot_version - - root = remove_suffix(os.path.dirname(os.path.realpath(__file__)), "/tools") - last_cache_time = update_cache_time(root) - copied_files = copy_all(root) - remove_stale_assets(root, copied_files, last_cache_time) - # check actor overlays for stale include dependencies i.e. "*.inc.c" - remove_stale_actors(root, last_cache_time) - - -if __name__ == "__main__": - main()